Skip to content

Instantly share code, notes, and snippets.

@bavey
Created December 2, 2014 16:20
Show Gist options
  • Save bavey/267b2156011ce74320ce to your computer and use it in GitHub Desktop.
Save bavey/267b2156011ce74320ce to your computer and use it in GitHub Desktop.
Git Magic
Git
1. I'm on master
2. git fetch
3. git pull origin master
4. git checkout -b BRANCH_NAME origin/master
5. git push -u origin BRANCH_NAME
git remote show origin
vim ~/.gitconfig
../git-autocomplete.sh
../git-bash.sh
$(git_ps1)
git checkout --> git go
git status --> git s, git stat
Git alias to echo back my aliases inside ~/.gitconfig
1. git reset origin/master
2. git stash
3. git branch -D BRANCH_NAME
4. git push --delete origin BRANCH_NAME
<see block 2>
Joe working too hard
git checkout -t -b BRANCH_NAME origin/BRANCH_NAME
Pre-Requisites:
- remote branch already exists
- local branch deleted
- no local branch called origin/BRANCH_NAME
git clean -fdx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment