[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gits] Git Workflow

On Jun 3, 2013, at 5:05 PM, Eric Eide <eeide at cs.utah.edu> wrote:

> 	Kirk> I reckoned that moving commits/history around like this wouldn't
> 	Kirk> be pretty.
> It makes you feel like a Time Lord.

For what it's worth, 'git rebase -i' is fairly easy to use once you get the basics down.

What I would do is put a tag on the commit where my local branch diverged from the upstream master (you can use 'git merge-base' to find it). Then, I'd make a new local branch, which initially pointed the same place as my master. With that branch checked out, I'd do 'git rebase -i <tagname>'. This pops open an editor with all of the commits between your tag and the current HEAD. Deleting lines in this editor will remove them from the new branch I just created.