![]() ![]() ![]() In fact, if you are working with multiple remotes, I recommend you delete the origin remote and create a new one for the same repository, but using a more descriptive name. You are free to create a new one and delete origin. There is nothing special about the “origin” remote, other than it is created for you. A remote is just a name used to manage references (URLs) to other repositories. When you first clone a git repository, git will automatically create a remote for you named “origin”. You are free to create a new one, and delete master (although, I don’t see any reason to go against the default convention). There is nothing special about this branch, other than it is the default. When you first create a git repository, it starts with a single branch named “master”. Clicking a file in the lower right pane scrolls the diff in the lower left pane to the corresponding section.The lower left shows the commit details, including the full diff.The lower right shows the list of files impacted by the second commit.The commit SHA (unique identifier, similar to subversion revision number) of the second commit is 3d024dd9e4a83d8c6a9a143a68b75d4b872115a6.I’ve highlighted the second commit, so that I can see its details in the lower pane.The yellow dot next to the top commit indicates that is the snapshot currently in my working folder (referred to as HEAD).There is a single remote reference branch: the “master” branch from the remote repository named “origin”, it also points to the most recent commit.There is a single local branch, named “master’”, it points to the most recent commit.The commit message for the most recent commit was “third commit”.There have been three commits, all by Tony Stark.The upper left pane shows the series of commits to this repository, with the most recent on top.There is a lot of information in this single screenshot: Remote: Total 9 (delta 0), reused 0 (delta 0) Remote: Compressing objects: 100% (4/4), done. I’ll start by creating a local copy of the repository: d:code>git clone empty Git repository in d:/code/gitk-demo/.git/ I created a simple repository on github to walk through some scenarios. This post is broken up into two parts – after reading this, you may want to read the second part. I learned by experimenting in a demo repository, trying out various commands, and using gitk to visualize their impact. Moving from subversion to git can be a struggle, trying to understand what terms like checkout, commit, branch, remote, rebase all mean in the git world. Use gitk to understand git 3 September, 2010. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |