Last active
February 19, 2019 14:16
-
-
Save KarllosSouza/63997b0a1991c8f15824 to your computer and use it in GitHub Desktop.
Revisions
-
KarllosSouza revised this gist
Feb 19, 2019 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains 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,6 +16,8 @@ Undo the last commit, but leave the changes available: `git reset HEAD~ --soft` Revert file to origin branch's version: `git checkout origin/master file_name` Sync local branch with remote branch: `git fetch --all && git reset --hard origin/master` Change message of last commit: `git commit --amend -m "New message"` Visual representation of the branch merging into master: `git log --oneline --graph` -
KarllosSouza revised this gist
Aug 6, 2018 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains 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 @@ -18,6 +18,8 @@ Revert file to origin branch's version: `git checkout origin/master file_name` Change message of last commit: `git commit --amend -m "New message"` Visual representation of the branch merging into master: `git log --oneline --graph` View unpushed git commits: `git log origin..` See previous git commands executed: `history | grep git` -
KarllosSouza revised this gist
Oct 13, 2017 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains 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 @@ -10,9 +10,11 @@ Remove local branches which are no longer available on the remote: `git fetch -p Undo non-pushed commits: `git reset origin/master` Undo the last commit: `git reset HEAD~ --hard` Undo the last commit, but leave the changes available: `git reset HEAD~ --soft` Revert file to origin branch's version: `git checkout origin/master file_name` Change message of last commit: `git commit --amend -m "New message"` -
KarllosSouza revised this gist
May 18, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains 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 @@ -12,7 +12,7 @@ Undo non-pushed commits: `git reset origin/master` Undo last commit: `git reset --hard HEAD~1` Revert file to origin branch's version: `git checkout origin/master file-name` Change message of last commit: `git commit --amend -m "New message"` -
KarllosSouza revised this gist
May 18, 2017 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains 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 @@ -12,6 +12,8 @@ Undo non-pushed commits: `git reset origin/master` Undo last commit: `git reset --hard HEAD~1` Revert to origin/master branch's a version of file: `git checkout origin/master file-name` Change message of last commit: `git commit --amend -m "New message"` View unpushed git commits: `git log origin..` -
KarllosSouza revised this gist
Mar 23, 2017 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains 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 @@ -10,6 +10,8 @@ Remove local branches which are no longer available on the remote: `git fetch -p Undo non-pushed commits: `git reset origin/master` Undo last commit: `git reset --hard HEAD~1` Change message of last commit: `git commit --amend -m "New message"` View unpushed git commits: `git log origin..` -
KarllosSouza revised this gist
Jan 3, 2017 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains 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 @@ -6,6 +6,8 @@ Delete a local branch: `git branch -d branch-name` Delete a remote branch: `git branch -dr origin/branch-name` Remove local branches which are no longer available on the remote: `git fetch -p` Undo non-pushed commits: `git reset origin/master` Change message of last commit: `git commit --amend -m "New message"` -
KarllosSouza revised this gist
Jul 7, 2016 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains 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 @@ -4,6 +4,8 @@ Rename a local branch: `git branch -m branch-name` Delete a local branch: `git branch -d branch-name` Delete a remote branch: `git branch -dr origin/branch-name` Undo non-pushed commits: `git reset origin/master` Change message of last commit: `git commit --amend -m "New message"` -
KarllosSouza revised this gist
May 31, 2016 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains 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 @@ -8,4 +8,6 @@ Undo non-pushed commits: `git reset origin/master` Change message of last commit: `git commit --amend -m "New message"` View unpushed git commits: `git log origin..` See previous git commands executed: `history | grep git` -
KarllosSouza created this gist
Sep 18, 2015 .There are no files selected for viewing
This file contains 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,11 @@ # Git Commands Rename a local branch: `git branch -m branch-name` Delete a local branch: `git branch -d branch-name` Undo non-pushed commits: `git reset origin/master` Change message of last commit: `git commit --amend -m "New message"` See previous git commands executed: `history | grep git`