[git-users] git mentor needed
Does anyone know a consultant who could help train us a bit on Git? I thought I understood most of the basics, but something things get very confusing and we need some help sorting things out. For example today we created a new branch and made some commits to it. But it shows that master is identical to this new branch, but in fact it should be 1 commit behind'. So it's as if whatever we commit to the new branch is also being committed to the branch called master. Maybe rebase has something to do with this? I read that rebase can split commits between branches: http://gitready.com/intermediate/2009/01/31/intro-to-rebase.html I'm tempted to just delete my repo and start tracking these files from scratch because something it no longer makes sense to me. But would be nice if we can just straighten it out, so I don't have to lose my revision history. If I compare master and with my new branch (search-label-issue) it shows the difference between them (one .css file was changed). So it knows that are different yet it says they are identical (instead of 1 commit behind) in the SmartGit branch switcher. That's screwed up! Cheers! -- You received this message because you are subscribed to the Google Groups Git for human beings group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/BPUTUSpI49kJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
[git-users] is master just a branch?
Is master just a branch or is there anything special about it? If we delete it, can we just create a new branch called master? Do we need to Rebase to it or something to move the HEAD to it? Somethings weird happened and we're trying to make things right again. Somehow I have two branches called origin/master -- You received this message because you are subscribed to the Google Groups Git for human beings group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/AwmdABTXquMJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] is master just a branch?
On Thu, 4 Oct 2012 02:12:19 -0700 (PDT) maxhodges m...@whiterabbitpress.com wrote: Is master just a branch or is there anything special about it? If we delete it, can we just create a new branch called master? Do we need to Rebase to it or something to move the HEAD to it? It's just a regular branch, nothing special at all in terms of its technical implementation. The only thing which is special about it, is that *by convention* a newly created repository has its special HEAD reference pointing to a branch named master, but the branch does not yet exist, and comes to existence when you record the first commit (w/o first doing something like `git checkout -b someotherbranch`). Somethings weird happened and we're trying to make things right again. Somehow I have two branches called origin/master First, this issue has nothing to do with your question above. Second, what you're facing is probably because you have one remote branch, which is really remotes/origin/branches and one local branch, which is called origin/master -- you can see the difference by running `git branch -a`. Just an example done on a real repository: C:\tmp\repogit branch -a * master remotes/origin/HEAD - origin/master remotes/origin/develop remotes/origin/master C:\tmp\repogit branch origin/master C:\tmp\repogit branch -a * master origin/master remotes/origin/HEAD - origin/master remotes/origin/develop remotes/origin/master C:\tmp\repogit branch * master origin/master Note that without the -a (meaning all) option, `git branch` shows you only your local branches. To deal with this situation, refer to the remote branch via its fuller name, remotes/origin/master. Supposedly you should examine what's the difference between your local branch master and your (probably wrongly named) branch origin/master and decide which one to keep and which one to delete. Also note that you can rename any branch using `git branch -m`. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] is master just a branch?
On Thu, 4 Oct 2012 15:14:27 +0400 Konstantin Khomoutov flatw...@users.sourceforge.net wrote: [...] Second, what you're facing is probably because you have one remote branch, which is really remotes/origin/branches and one local branch, which is called origin/master -- you can see the difference by running `git branch -a`. [...] To deal with this situation, refer to the remote branch via its fuller name, remotes/origin/master. Supposedly you should examine what's the difference between your local branch master and your (probably wrongly named) branch origin/master and decide which one to keep and which one to delete. Also note that you can rename any branch using `git branch -m`. To further expand on this topic -- the way Git resolves branch names to their real full names is explained in the section SPECIFYING REVISIONS of the `git rev-parse` manual [1]. From that, you can gather that when you tell Git your branch is named origin/master, it first tries to find a branch having the full name refs/heads/origin/master (a local branch) and only if this fails, it tries to find refs/remotes/origin/master (a remote branch), so when you have a name clash like this, you should somehow disambiguate the name so Git looks finds what was intended. 1. http://www.kernel.org/pub/software/scm/git/docs/git-rev-parse.html -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Re: git mentor needed
On Thu, 4 Oct 2012 03:27:02 -0700 (PDT) Thomas Ferris Nicolaisen tfn...@gmail.com wrote: [...] I find a great way to study the actual state of the current branches is with 'git log', more specifically with these parameters: git log --graph --oneline --decorate --all (You can configure an alias 'git logtree' for the above command like this: git config alias.logtree log --graph --oneline --decorate --all - very handy.) [...] Another good option to get a bird's eye overview of the repository is to just run `gitk --all` -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Re: git mentor needed
On Thu, 4 Oct 2012 03:27:02 -0700 (PDT) Thomas Ferris Nicolaisen tfn...@gmail.com wrote: [...] If you create a branch search-label-issue out from master, it is not necessarily given that the new commits are supposed to be merged back into master. It could be a throw-away experimental branch, a release branch, or whatever. In any case, there would be situations where it would be confusing to output the same You are behind.. thing as for tracking branches. Moreover, what if I merged some other branch into my search-label-issue branch and then recorded another commit -- should I now be made aware by Git that I'm ahead of two branches -- the one I initially forked off and the one I merged in and then diverged from? The way of thinking when working with a DVCS system requires certain getting into ;-) What you can do instead if you want to compare what's going on between your branches, is to use git logtree like I described above, or more fine-grained commands like: [...] git diff master...search-label-issue More info on this (with pictures) can be read in http://git-scm.com/book/en/Git-Tools-Revision-Selection#Commit-Ranges -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Re: git mentor needed
other (none distributed) systems are certainly easier to learn. We were fine with GIT for a few weeks, then suddenly our project is no longer working as expected. Hope we can sort it out with a bit of professional help. On Fri, Oct 5, 2012 at 2:45 AM, Konstantin Khomoutov flatw...@users.sourceforge.net wrote: On Thu, 4 Oct 2012 03:27:02 -0700 (PDT) Thomas Ferris Nicolaisen tfn...@gmail.com wrote: [...] If you create a branch search-label-issue out from master, it is not necessarily given that the new commits are supposed to be merged back into master. It could be a throw-away experimental branch, a release branch, or whatever. In any case, there would be situations where it would be confusing to output the same You are behind.. thing as for tracking branches. Moreover, what if I merged some other branch into my search-label-issue branch and then recorded another commit -- should I now be made aware by Git that I'm ahead of two branches -- the one I initially forked off and the one I merged in and then diverged from? The way of thinking when working with a DVCS system requires certain getting into ;-) What you can do instead if you want to compare what's going on between your branches, is to use git logtree like I described above, or more fine-grained commands like: [...] git diff master...search-label-issue More info on this (with pictures) can be read in http://git-scm.com/book/en/Git-Tools-Revision-Selection#Commit-Ranges -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.