Today I Learned: Undoing a git rebase

The easiest way would be to find the head commit of the branch as it was immediately before the rebase started in the reflog… git reflog and to reset the current branch to it (with the usual caveats about being absolutely sure before reseting with the --hard option). Suppose the old commit was HEAD@{5} in the ref log: git reset --hard HEAD@{5} In Windows, you may need to quote the reference: ...

June 20, 2019

Today I Learned: Git Submodules

A short update about submodules in git. Git submodules Let’s start by adding an existing Git repository as a submodule of the repository that we’re working on. To add a new submodule you use the git submodule add command with the absolute or relative URL of the project you would like to start tracking. git submodule add https://github.com/forcewake/CommandPipeline By default, submodules will add the subproject into a directory named the same as the repository. ...

November 13, 2015