Last active
June 21, 2016 17:46
Revisions
-
scott-joe revised this gist
Jun 21, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -46,7 +46,7 @@ `git push --follow-tags` ###Checkout [latest tag](http://stackoverflow.com/questions/17414104/git-checkout-latest-tag) git checkout $(git describe --tags `git rev-list --tags --max-count=1`) ###Remove a remote tag git tag -d [tagName] -
scott-joe revised this gist
Jun 21, 2016 . 1 changed file with 14 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,7 +23,7 @@ `git reset --hard origin/master` ###Push non-master branch to Heroku `git push heroku [branchName]:master` `git push heroku +HEAD:master` @@ -38,6 +38,16 @@ git commit -C ORIG_HEAD ###Rename branch locally and remote git branch -m old_branch [newBranchName] git push origin :[oldBranchName] git push --set-upstream origin [newBranchName] ###Push both commits and [annotated tags](http://stackoverflow.com/questions/5195859/push-a-tag-to-a-remote-repository-using-git) `git push --follow-tags` ###Checkout [latest tag](http://stackoverflow.com/questions/17414104/git-checkout-latest-tag) git checkout $(git describe --tags `git rev-list --tags --max-count=1`) ###Remove a remote tag git tag -d [tagName] git push origin :refs/tags/[tagName] -
scott-joe revised this gist
Jun 20, 2016 . 1 changed file with 6 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -35,4 +35,9 @@ git reset --soft HEAD~ << edit files as necessary >> git add [yourFiles] git commit -C ORIG_HEAD ###Rename branch locally and remote git branch -m old_branch new_branch git push origin :old_branch git push --set-upstream origin new_branch -
scott-joe revised this gist
Jun 17, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -28,7 +28,7 @@ `git push heroku +HEAD:master` ###Set a Heroku remote to an existing repo `heroku git:remote -a [heroku app name]` ###fix a local commit git commit -m "Something terribly misguided" -
scott-joe revised this gist
Jun 16, 2016 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,6 +9,7 @@ ###Delete remote branch `git push origin --delete [branchName]` `git push origin :[branchName]` ###Prune local branches -
scott-joe revised this gist
Jun 16, 2016 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,13 +16,19 @@ ###Various resets `git reset --soft HEAD^` `git reset --hard HEAD` `git reset --hard origin/master` ###Push non-master branch to Heroku `git push heroku branchName:master` `git push heroku +HEAD:master` ###Set a Heroku remote to an existing repo `heroku git:remote -a fuelux-components-staging` ###fix a local commit git commit -m "Something terribly misguided" git reset --soft HEAD~ -
scott-joe revised this gist
Oct 27, 2015 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -24,8 +24,8 @@ `git push heroku +HEAD:master` ###fix a local commit git commit -m "Something terribly misguided" git reset --soft HEAD~ << edit files as necessary >> git add [yourFiles] git commit -C ORIG_HEAD -
scott-joe revised this gist
Oct 27, 2015 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -24,8 +24,8 @@ `git push heroku +HEAD:master` ###fix a local commit git commit -m "Something terribly misguided" git reset --soft HEAD~ << edit files as necessary >> git add [yourFiles] git commit -C ORIG_HEAD -
scott-joe revised this gist
Oct 27, 2015 . 1 changed file with 21 additions and 21 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,31 +1,31 @@ ###Create and checkout a new branch `git checkout -b [branchName]` ###Checkout a remote branch `git checkout -b [localBranchName] origin/[remoteBranchName]` ###Push local branch to remote `git push -u origin [branchName]` ###Delete remote branch `git push origin --delete [branchName]` `git push origin :[branchName]` ###Prune local branches `git remote prune origin` ###Various resets `git reset --soft HEAD^` `git reset --hard HEAD` `git reset --hard origin/master` ###Push non-master branch to Heroku `git push heroku branchName:master` `git push heroku +HEAD:master` ###fix a local commit ```git commit -m "Something terribly misguided" git reset --soft HEAD~ << edit files as necessary >> git add [yourFiles] git commit -C ORIG_HEAD``` -
scott-joe renamed this gist
Oct 27, 2015 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -24,8 +24,8 @@ git push heroku branchName:master git push heroku +HEAD:master #fix a local commit git commit -m "Something terribly misguided" git reset --soft HEAD~ << edit files as necessary >> git add [yourFiles] git commit -C ORIG_HEAD -
scott-joe revised this gist
Oct 27, 2015 . 1 changed file with 8 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -21,4 +21,11 @@ git reset --hard origin/master #Push non-master branch to Heroku git push heroku branchName:master git push heroku +HEAD:master #fix a local commit $ git commit -m "Something terribly misguided" $ git reset --soft HEAD~ << edit files as necessary >> $ git add [yourFiles] $ git commit -C ORIG_HEAD -
scott-joe revised this gist
Jan 28, 2015 . 2 changed files with 24 additions and 20 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,20 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ #Create and checkout a new branch git checkout -b [branchName] #Checkout a remote branch git checkout -b [localBranchName] origin/[remoteBranchName] #Push local branch to remote git push -u origin [branchName] #Delete remote branch git push origin --delete [branchName] git push origin :[branchName] #Prune local branches git remote prune origin #Various resets git reset --soft HEAD^ git reset --hard HEAD git reset --hard origin/master #Push non-master branch to Heroku git push heroku branchName:master git push heroku +HEAD:master -
scott-joe created this gist
Jan 28, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ # Git commands I always forget - Create and checkout a new branch - `git checkout -b branchName` - Checkout a remote branch - `git checkout -b localBranchName origin/remoteBranchName` - Push local branch to remote - `git push -u origin branchName` - Delete remote branch - `git push origin --delete branchName` - `git push origin :branchName` - Prune local branches - `git remote prune origin` - Various resets - `git reset --soft HEAD^` - `git reset --hard HEAD` - `git reset --hard origin/master` - Push non-master branch to Heroku - `git push heroku branchName:master` - `git push heroku +HEAD:master`