Skip to content

Instantly share code, notes, and snippets.

@siwka
Created November 10, 2013 22:12
Show Gist options
  • Save siwka/7404651 to your computer and use it in GitHub Desktop.
Save siwka/7404651 to your computer and use it in GitHub Desktop.
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