www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - github question

reply "AndyC" <andy squeakycode.net> writes:
I'm new to git and github, I read the "10 tips" posted earlier, 
and I dont understand the last one: Avoid thrashing.

The story says, "Instead, remove the offending commits, and force 
push your modified branch".

How would one do that?  Is there doc's around that might explain 
that in a little more detail?

Thanks,

-Andy
Jan 22 2015
parent reply "Daniel Murphy" <yebbliesnospam gmail.com> writes:
"AndyC"  wrote in message news:afvimfdmrfevmcjuuyxq forum.dlang.org...

 I'm new to git and github, I read the "10 tips" posted earlier, and I dont 
 understand the last one: Avoid thrashing.

 The story says, "Instead, remove the offending commits, and force push 
 your modified branch".

 How would one do that?  Is there doc's around that might explain that in a 
 little more detail?
Usually it's done with git's interactive rebase. You can easily reorder and combine commits, so if eg part of an earlier commit was reverted the original and the revert commit can be combined. Searching for "interactive rebase" will get you lots of tutorials.
Jan 22 2015
parent "AndyC" <andy squeakycode.net> writes:
On Friday, 23 January 2015 at 03:33:22 UTC, Daniel Murphy wrote:
 "AndyC"  wrote in message 
 news:afvimfdmrfevmcjuuyxq forum.dlang.org...

 I'm new to git and github, I read the "10 tips" posted 
 earlier, and I dont understand the last one: Avoid thrashing.

 The story says, "Instead, remove the offending commits, and 
 force push your modified branch".

 How would one do that?  Is there doc's around that might 
 explain that in a little more detail?
Usually it's done with git's interactive rebase. You can easily reorder and combine commits, so if eg part of an earlier commit was reverted the original and the revert commit can be combined. Searching for "interactive rebase" will get you lots of tutorials.
Ah, thank you. I found this one pretty descriptive: http://robots.thoughtbot.com/git-interactive-rebase-squash-amend-rewriting-history -Andy
Jan 22 2015