Re: [git-users] Sync with a Master
On 05/01/10 Trans said: So I've cloned a repo, which is a fork of another repo. If I want to update my repo to match the original (and ditch any changes I may have made), how do I do it? Did you follow any workflow guidelines and make your changes on separate branches from master? If not your simplest option is to delete your cloned repo and reclone it. Otherwise, just delete the branches you no longer need and pull changes from upstream master to yours. This won't sync other branches from upstream but you can make that happen too, especially if you made them tracking branches. I think you have some reading to do... Mike -- Michael P. Soulier msoul...@digitaltorque.ca Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction. --Albert Einstein signature.asc Description: Digital signature
[git-users] Re: Sync with a Master
On Jan 6, 9:20 am, Michael P. Soulier msoul...@digitaltorque.ca wrote: On 05/01/10 Trans said: So I've cloned a repo, which is a fork of another repo. If I want to update my repo to match the original (and ditch any changes I may have made), how do I do it? Did you follow any workflow guidelines and make your changes on separate branches from master? If not your simplest option is to delete your cloned repo and reclone it. I am using github. So I have my own fork. So it's more involved then that. I would have to delete my fork, then refork it and then reclone it. I was hoping for a simple way to update my repo without having to do all that. Otherwise, just delete the branches you no longer need and pull changes from upstream master to yours. This won't sync other branches from upstream but you can make that happen too, especially if you made them tracking branches. I think you have some reading to do... Too much reading... and I've already had to read too much as far as I am concerned. -- 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: Sync with a Master
On 06/01/10 Trans said: I am using github. So I have my own fork. So it's more involved then that. I would have to delete my fork, then refork it and then reclone it. I was hoping for a simple way to update my repo without having to do all that. As you haven't answered my question I'll assume you made your changes on master, and now you want to undo them. The simplest way is likely to revert the commits you added and them pull again, but there are other ways of rewriting history if required. Too much reading... and I've already had to read too much as far as I am concerned. I see. Best of luck then. Mike -- Michael P. Soulier msoul...@digitaltorque.ca Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction. --Albert Einstein signature.asc Description: Digital signature
Re: [git-users] Re: Sync with a Master
On Wed, Jan 06, 2010 at 06:34:37AM -0800, Trans wrote: So I've cloned a repo, which is a fork of another repo. If I want to update my repo to match the original (and ditch any changes I may have made), how do I do it? Did you follow any workflow guidelines and make your changes on separate branches from master? If not your simplest option is to delete your cloned repo and reclone it. I am using github. So I have my own fork. So it's more involved then that. I would have to delete my fork, then refork it and then reclone it. I was hoping for a simple way to update my repo without having to do all that. I've just forked my friend's project on github, checked it out, and it seems that the forked repo is not really tied to the repo it was forked off: there's just one remote, origin, which is my forked repo. So I think you have two ways to solve your problem: 1) Dumb but simple: just re-fork. 2) Smart but complicated: a) Add original repo, which you forked, as a second remote to your repo: just grab its read-only URL and do `git remote add ...` with that URL. b) Fetch the branches and necessary objects from that remote using `git fetch REMOTE`. c) Re-create your local branches from the matching branches from that remote (this would require some branch renaming and creation using `git branch ...`). d) Re-write matching branches in your forked remote branches using `git push ...` with the -f command-line option. Otherwise, just delete the branches you no longer need and pull changes from upstream master to yours. This won't sync other branches from upstream but you can make that happen too, especially if you made them tracking branches. I think you have some reading to do... Too much reading... and I've already had to read too much as far as I am concerned. That's quite impolite, you know. We're not your personal paid tech support so better make these statements to yourself, privately. -- 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: Sync with a Master
On Wed, Jan 06, 2010 at 06:34:37AM -0800, Trans wrote: [...] I am using github. So I have my own fork. So it's more involved then that. I would have to delete my fork, then refork it and then reclone it. I was hoping for a simple way to update my repo without having to do all that. Correction: (2.d) in my reply should read as Re-write matching branches in your forked remote repository using `git push ...` with the -f command-line option. The idea is that after you have replaced your local branches with the branches from the newly added remote repository, you'll have you hard reset these branches in your original remote repository (which contains the fork). -- 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.