digitalmars.D.learn - Dumb question about git
- H. S. Teoh (15/15) Mar 01 2012 OK, so I'm new to git, and I ran into this problem:
- Dmitry Olshansky (10/23) Mar 01 2012 I use the magic
- Daniel Murphy (6/21) Mar 01 2012 Unless you have an expectation that other people are already using the o...
OK, so I'm new to git, and I ran into this problem: - I forked druntime on github and made some changes in a branch - Pushed the changes to the fork - Pulled upstream commits to master - Merged master with branch - Ran git rebase master, so that my changes appear on top of the latest upstream master. - Tried to push branch to my fork, but now it complains that I have non-fast-forward changes and rejects the push. What's the right thing to do here? Looks like I screwed up my branch history. How do I fix it? Thanks! T -- Real Programmers use "cat > a.out".
Mar 01 2012
On 01.03.2012 19:11, H. S. Teoh wrote:OK, so I'm new to git, and I ran into this problem: - I forked druntime on github and made some changes in a branch - Pushed the changes to the forkI use the magic pull --rebase <how-ever-you-call-dlang> master instead of these 3 if I have changes but want to sync with upstream.- Pulled upstream commits to master - Merged master with branch - Ran git rebase master, so that my changes appear on top of the latest upstream master.That's pretty much all.- Tried to push branch to my fork, but now it complains that I have non-fast-forward changes and rejects the push.I think push --force should do the trickWhat's the right thing to do here? Looks like I screwed up my branch history. How do I fix it? Thanks! T-- Dmitry Olshansky
Mar 01 2012
Unless you have an expectation that other people are already using the old version of your branch, just use 'git push blah -f' to overwrite the old version. It's not a big deal for patches and pull requests, but it would be a disaster if anyone did this to the master branch. "H. S. Teoh" <hsteoh quickfur.ath.cx> wrote in message news:mailman.271.1330614611.24984.digitalmars-d-learn puremagic.com...OK, so I'm new to git, and I ran into this problem: - I forked druntime on github and made some changes in a branch - Pushed the changes to the fork - Pulled upstream commits to master - Merged master with branch - Ran git rebase master, so that my changes appear on top of the latest upstream master. - Tried to push branch to my fork, but now it complains that I have non-fast-forward changes and rejects the push. What's the right thing to do here? Looks like I screwed up my branch history. How do I fix it? Thanks! T -- Real Programmers use "cat > a.out".
Mar 01 2012