[git-users] rebasing with unstaged changes
I have to make a change in one file, call it Annoying.cpp, to get a library to work on my system. I then want to make other changes in other files, and produce a patch. I made several commits, just never 'git adding' Annoying.cpp. Now I want to squash the last several commits. When I do a 'git rebase' it yells that I haven't committed all of my changes. I don't want to commit them though so that they are not part of the patch. What can I do? I could 'git checkout Annoying.cpp' to do the rebase, but then I'll have to make the change again after the rebase. Is this the only option? Thanks, David -- 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.
[git-users] Your branch is ahead of origin/master
I don't understand what it means by Your branch is ahead of origin/master Even if I do a git reset --hard origin/master git pull origin master git tells me: [dor...@localhost ITK]$ git status # On branch master # Your branch is ahead of 'origin/master' by 145 commits. # nothing to commit (working directory clean) How can that be? Shouldn't it be exactly equal to origin/master now? Thanks, David -- 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-us...@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] Your branch is ahead of origin/master
So how would I undo all of these commits and get my folder back to exactly looking like origin/master? (short of deleting it and re-cloning)? David On Wed, Nov 10, 2010 at 9:11 PM, Alberto Leal albert...@gmail.com wrote: It means that you have some commits in your branch that weren't pushed to origin. To keep your local branch in sync with origin, you need to push your code to that frequently. git push origin master On Thu, Nov 11, 2010 at 12:05 AM, David Doria daviddo...@gmail.com wrote: I don't understand what it means by Your branch is ahead of origin/master Even if I do a git reset --hard origin/master git pull origin master git tells me: [dor...@localhost ITK]$ git status # On branch master # Your branch is ahead of 'origin/master' by 145 commits. # nothing to commit (working directory clean) How can that be? Shouldn't it be exactly equal to origin/master now? Thanks, David -- 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-us...@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. -- Alberto Leal http://www.albertoleal.eti.br -- 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-us...@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-us...@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] diff-ing branches
Here is my setup: MasterRepo: branch 'master' - this is the live copy SecondRepo: branch 'mybranch' - cloned from MasterRepo's master branch a long time ago. Changes have been made. What I want to do is see which files are different in SecondRepo's mybranch versus MasterRepo's master branch. Can I do this? All of the commands I have found are for diffing two branches in the same repository. Thoughts? Thanks! David -- 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-us...@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: diff-ing branches
Good idea. I tried to do that, but the diff command fails: [dor...@doriadjec VTK-PCA]$ git remote add kitware git://vtk.org/VTK.git [dor...@doriadjec VTK-PCA]$ git fetch kitware master remote: Counting objects: 6937, done. ... * branchmaster - FETCH_HEAD [dor...@doriadjec VTK-PCA]$ git log --oneline VTK-PCA ^remotes/kitware/master fatal: bad revision '^remotes/kitware/master' I also tried without the ^ (I didn't know if it was a typo) [dor...@doriadjec VTK-PCA]$ git log --oneline VTK-PCA remotes/kitware/master fatal: ambiguous argument 'remotes/kitware/master': unknown revision or path not Use '--' to separate paths from revisions [dor...@doriadjec VTK-PCA]$ git branch * VTK-PCA VTK-daviddoria (you can see my current branch is called VTK-PCA) Thanks for the help so far, David On Tue, Oct 12, 2010 at 1:45 PM, Konstantin Khomoutov khomou...@gmail.com wrote: On Oct 12, 9:17 pm, David Doria daviddo...@gmail.com wrote: Here is my setup: MasterRepo: branch 'master' - this is the live copy SecondRepo: branch 'mybranch' - cloned from MasterRepo's master branch a long time ago. Changes have been made. What I want to do is see which files are different in SecondRepo's mybranch versus MasterRepo's master branch. Can I do this? All of the commands I have found are for diffing two branches in the same repository. So just bring the MasterRepo's master branch to the SecondRepo and do any comparisons you need. Then delete that branch. For instance: $ git remote add roots ssh://URL/of/MasterRepo $ git fetch roots master $ git log --oneline master ^remotes/roots/master ... $ git remote rm roots -- 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-us...@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-us...@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] How to retrieve a users email?
When I git blame file.h I see a user name: 25df65ef (Meng ZHU 2010-07-15 18:08:17 -0400 69) { How can I ask git for Meng ZHU's email (assuming he specified user.email of course)? Thanks, David -- 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-us...@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] How to retrieve a users email?
Very cool, thanks. David On Thu, Oct 7, 2010 at 5:12 PM, Stéphane Corlosquet scorlosq...@gmail.comwrote: Hi David, I would try git show 25df65ef Steph. On Thu, Oct 7, 2010 at 3:38 PM, David Doria daviddo...@gmail.com wrote: When I git blame file.h I see a user name: 25df65ef (Meng ZHU 2010-07-15 18:08:17 -0400 69) { How can I ask git for Meng ZHU's email (assuming he specified user.email of course)? Thanks, David -- 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-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.comgit-users%2bunsubscr...@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-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.comgit-users%2bunsubscr...@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-us...@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 commit not doing anything
On Thu, Sep 9, 2010 at 10:38 PM, Jeffrey jefr...@gmail.com wrote: Are you sure you don't for some reason have a hook which silently fails? Bizarre, but possible... Ah man, that was it! Git should definitely FIRST say Hook failed unconditionally, then allow for the hook error messages. That was so frustrating... Thanks though! -- 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-us...@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] Re: git commit not doing anything
Yep, I tried that too (though it should be equivalent to the git add . git commit that I've been trying. I even tried git commit -v -m test commit and nothing is displayed (even with the verbose output!) This is driving me crazy... any more thoughts? On Aug 31, 1:09 am, iñigo medina imed...@grosshat.com wrote: Hi David, did you try with git commit -a? iñ I have some staged files: [dor...@localhost VTK-GraphColors]$ git status # On branch VTK-GraphColors # Changes to be committed: # (use git reset HEAD file... to unstage) # # modified: Infovis/vtkApplyColors.cxx # modified: Infovis/vtkApplyColors.h # modified: Views/vtkRenderedGraphRepresentation.cxx # modified: Views/vtkRenderedGraphRepresentation.h but when I try to commit: [dor...@localhost VTK-GraphColors]$ git commit -m ENH: allow passthrough coloring nothing happens. There are no errors, it simply doesn't commit the files. Any clues? Thanks, David -- 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-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.comgit-users%2bunsubscr...@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-us...@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] git commit not doing anything
I have some staged files: [dor...@localhost VTK-GraphColors]$ git status # On branch VTK-GraphColors # Changes to be committed: # (use git reset HEAD file... to unstage) # # modified: Infovis/vtkApplyColors.cxx # modified: Infovis/vtkApplyColors.h # modified: Views/vtkRenderedGraphRepresentation.cxx # modified: Views/vtkRenderedGraphRepresentation.h but when I try to commit: [dor...@localhost VTK-GraphColors]$ git commit -m ENH: allow passthrough coloring nothing happens. There are no errors, it simply doesn't commit the files. Any clues? Thanks, David -- 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-us...@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] Pushing to master from Experimental
Hi all, If I do git clone 'repo' then do some work, then git push origin master I get error: failed to push some refs to 'repo' Then if I do git pull --rebase git push origin master it works fine. However, if I git clone 'repo' git branch Experimental git checkout Experimental do some work git push origin master I get error: failed to push some refs to 'repo' Then if I do git pull --rebase git push origin master I get the same error: failed to push some refs to 'repo' Is there something that needs to be done different if working not directly on the master branch? Thanks, David -- 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-us...@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] Re: Pushing to master from Experimental
Ah yes, always so clear... haha So I need to do git push origin Experimental:master ? Thanks, David On Aug 21, 10:01 am, Konstantin Khomoutov khomou...@gmail.com wrote: On Aug 21, 5:04 pm, David Doria daviddo...@gmail.com wrote: [...] However, if I git clone 'repo' git branch Experimental git checkout Experimental do some work git push origin master I get error: failed to push some refs to 'repo' Then if I do git pull --rebase git push origin master I get the same error: failed to push some refs to 'repo' Is there something that needs to be done different if working not directly on the master branch? Let's quote the git-push manual: refspec... The format of a refspec parameter is an optional plus +, followed by the source ref src, followed by a colon :, followed by the destination ref dst. It is used to specify with what src object the dst ref in the remote repository is to be updated. ... If :dst is omitted, the same ref as src will be updated. Now, when you do git push origin master Git tries to update the remote branch master using the local branch master. -- 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-us...@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] Checking out a branch
First, I clone my github repo: git clone g...@github.com:daviddoria/daviddoria-vtk.git Then I want to work on a particular branch (there are several - you can see them here: http://github.com/daviddoria/daviddoria-vtk) If I 'git branch -a' I see: [dor...@doriadjec VTK-GraphIterators]$ git branch -a VTK-daviddoria remotes/origin/HEAD - origin/VTK-daviddoria remotes/origin/VTK-AllProjects remotes/origin/VTK-GraphConversions etc Then if I git checkout remotes/origin/VTK-GraphConversions it says that I am on a detached HEAD If I instead do git checkout -b VTK-GraphConversions remotes/origin/VTK- GraphConversions It seems like it creates a NEW branch because I get $ git branch -a * VTK-GraphConversions VTK-daviddoria remotes/origin/VTK-GraphConversions How should I begin working on a branch after I clone the repo? Thanks! David -- 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-us...@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] Re: Merging workflow
Ah, so fetch is an operation on the entire repository and merge is an operation on a specific branch? So you're say that 'pull'ing each branch is not necessary because the 'fetch' in 'pull's fetch+merge is redundant. Is that correct? I also don't understand why this is a deficient approach? If each branch is for a bug fix, then wouldn't it make sense to want to be able to work with a branch that has ALL of the bugs fixed? Thanks for your help so far! David On Aug 13, 11:31 am, Konstantin Khomoutov khomou...@gmail.com wrote: On Aug 13, 5:12 am, David Doria daviddo...@gmail.com wrote: [...] Then when I update something in Project1, I just do a |[dor...@localhost AllProjects]$ git pull origin Project1 and AllProjects is now up to date. It's not clear why you need to pull each branch. Note that pull does fetch + merge, so each pull makes Git access the remote and ask for changes. Hence doing multiple pulls in a row would only be sensible if each of your ProjectN branches is hosted in its own remote repository. From your last example, it's appears to not be the case, so you should probably do one fetch followed by multiple merges: $ git fetch origin $ git checkout All $ git merge origin/Project1 $ git merge origin/Project2 ... Is there any standard way to make a script to pull from a whole bunch of projects? Or should I just make a bash script with git pull origin Project1 git pull origin Project2 etc ? To me, it appears that if you want such automation, something is wrong. Having N parallel branches to develop N features and/or fix bugs is perfectly OK, but having a need to periodically merge them _all at once_ appears to be a deficient approach. Usually you should be careful when doing each merge except for no-brainer fast-forwarding cases, and in your setup fast-forwards should be rare. At least, if you will decide to write a shell script doing multiple merges in a row, start it with set -e to make it crash as soon as the current merge command fails due to conflicts. -- 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-us...@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] Merging workflow
Hi all, I have a branch called daviddoria. From this branch, I created multiple branches (Project1, Project2, and Project3). I want to have a branch where I can use everything from all three project branches. My question is - if I merge Project1 into daviddoria, won't this also affect Project2 and Project3 (i.e. the next time Project2 and Project3 are pulled they will get all of the changes made to Project1)? If that is correct, how can I make a branch that contains all of the changes to all of the projects but still keep all of the projects separate from each other? Thanks! David -- 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-us...@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] Re: Merging workflow
Wow.. it was that easy. Then when I update something in Project1, I just do a |[dor...@localhost AllProjects]$ git pull origin Project1 and AllProjects is now up to date. Is there any standard way to make a script to pull from a whole bunch of projects? Or should I just make a bash script with git pull origin Project1 git pull origin Project2 etc ? Thanks for the help! David On Aug 12, 11:10 am, Donovan Bray donno...@gmail.com wrote: Create a new branch all (or some other more descriptive name) based on daviddoria, then merge the other projects into it. You have your combined branch, and all of the source branches won't be polluted by each others commits. On Aug 12, 2010, at 7:22 AM, David Doria daviddo...@gmail.com wrote: Hi all, I have a branch called daviddoria. From this branch, I created multiple branches (Project1, Project2, and Project3). I want to have a branch where I can use everything from all three project branches. My question is - if I merge Project1 into daviddoria, won't this also affect Project2 and Project3 (i.e. the next time Project2 and Project3 are pulled they will get all of the changes made to Project1)? If that is correct, how can I make a branch that contains all of the changes to all of the projects but still keep all of the projects separate from each other? Thanks! David -- 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-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group athttp://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-us...@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.