Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Git example workflow
$> git add . -A # adds all files, including deleted files
(file was changed during this time)
$> git checkout -b new_master
$> git status #discovered changed file
$> git add .
$> git commit --amend -C HEAD # adds file in staging to the most recent commit
$> git branch -D master
$> git checkout -b master
$> git push -f origin master # blows away existing remote master and replaces with our master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment