[git-users] Using branches within a git svn repository
I created a git repository using the instructions in http://blog.tfnico.com/2010/08/syncing-your-git-repo-with-subversion.html and it seems to be set up correctly. The svn fetch repository has branches as * master remotes/branch1 remotes/branch2 while the bare repository (for the team to pull from and push to) just has * master In the svn repository should I run git branch branch1 remotes/branch1 git branch branch2 remotes/branch2 In that case, should I push git push origin branch1 git push origin branch2 git push origin master Or is there a way to handle the pushing fully without specifying what needs to be pushed? For example would git push origin be sufficient? When keeping the fetch repository up to date do I always use git svn rebase or do I need to do git svn fetch to keep the branches up to date? -- Sabba - סבא הלל - Hillel Hillel (Sabba) Markowitz | Said the fox to the fish, Join me ashore sabbahil...@gmail.com | The fish are the Jews, Torah is our water http://sabbahillel.blogspot.com -- 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] git revert deleted my files - how to restore
Hi, Im a beginner to git . I did a git add directory . It added all the files in the directory some of them are .o and generated files so i did not want to commit . so i did a git revert . After that i see that git revert removed all my files in directory .. i did not expect that . How to restore my files? .It removed all the files i have worked on for some time. I had to rewrite all the files again. I think this is not a good behaviour of git .. Is this correct ? is there any way i can restore my files ? Thanks, Chandra -- 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] git revert deleted my files - how to restore
On Wed, Mar 16, 2011 at 11:33:37AM -0700, pbg wrote: Im a beginner to git . I did a git add directory . It added all the files in the directory some of them are .o and generated files so i did not want to commit . so i did a git revert . After that i see that git revert removed all my files in directory .. i did not expect that . How to restore my files? .It removed all the files i have worked on for some time. I had to rewrite all the files again. I think this is not a good behaviour of git .. Is this correct ? It's better phrased that it's not a behaviour of Git you expected. I mean that if Git would refuse to delete the files added by the commit being reverted, that could raise some eyebrows, too. is there any way i can restore my files ? Yes. Reverting a commit does not rewrite history but rather it's appending a new record to the chain of commit: git-revert records a new commit which undoes the changes introduced by the reverted commit. Hence, the original commit is still present in the history record and, which might or might not be more important, the commit immediately preceding the new one introduced by git-revert's action is also present. So, to undo what git-revert did just immediately perform $ git reset --hard HEAD^ which just forgets the tip commit (that one recorded by git-revert). Note that obviously this only works if you did not commit anything after git-revert. Otherwise you would either use rebasing to remove the commit recorded by git-revert or just revert it. In other words, please read the git-revert man page and try to fully understand what git-revert does. Then the ways to undo its changes will be clear (provided you have read about undoing changes in Git which is assumed). P.S. For the future, note that git-revert supports the --no-commit command line option which allows you to edit the index formed by the git-revert action before committing its state. So you could use it to unstage the deletion of correct files and then commit. -- 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] Re: Using branches within a git svn repository
Hi Sabba, With the proper configuration, only one push is needed. Check out this more recent post, it covers an example setup for handling branches in a similar setup: http://blog.tfnico.com/2010/11/git-svn-mirror-for-multiple-branches.html As you can see, the magic is in the push-configuration in .git/config -- 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.