Skip to content

Instantly share code, notes, and snippets.

@max8hine
Last active July 18, 2019 05:44
Show Gist options
  • Save max8hine/63b3fd299b2bcf2ee7be4514cacae5d4 to your computer and use it in GitHub Desktop.
Save max8hine/63b3fd299b2bcf2ee7be4514cacae5d4 to your computer and use it in GitHub Desktop.
Working with Git

Work with git

git pull from master into the development branch

git checkout dmgr2      # gets you "on branch dmgr2"
git fetch origin        # gets you up to date with origin
git merge origin/master

read more

Undo the most recent local commits

git reset --soft HEAD^
#or
git reset --soft HEAD~

Replace the last commit to new commit:

git commit --amend -m "message"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment