Last active
July 7, 2020 11:08
-
-
Save ufukomer/c52de8b72811cc7d5eed to your computer and use it in GitHub Desktop.
Revisions
-
ufukomer revised this gist
Jul 7, 2020 . 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 @@ -123,4 +123,10 @@ git rev-parse --short HEAD ``` git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d ``` ### Ignore changes ``` git update-index --assume-unchanged ``` -
ufukomer revised this gist
Jul 9, 2018 . 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 @@ -117,4 +117,10 @@ https://stackoverflow.com/a/19859644/3650955 ``` git rev-parse --short HEAD ``` ### Delete merged branches ``` git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d ``` -
ufukomer revised this gist
Mar 16, 2018 . 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 @@ -112,3 +112,9 @@ git branch -m <old_name> <new_name> ### Recommit unpushed commit https://stackoverflow.com/a/19859644/3650955 ### Print short hash of last commit ``` git rev-parse --short HEAD ``` -
ufukomer revised this gist
Jul 5, 2017 . 1 changed file with 4 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 @@ -108,3 +108,7 @@ git push --force ``` git branch -m <old_name> <new_name> ``` ### Recommit unpushed commit https://stackoverflow.com/a/19859644/3650955 -
ufukomer revised this gist
Jun 15, 2017 . 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 @@ -102,3 +102,9 @@ git checkout -- a // a is directory git commit --allow-empty -m "Trigger" git push --force ``` ### Rename local branch ``` git branch -m <old_name> <new_name> ``` -
ufukomer revised this gist
Jun 6, 2017 . 1 changed file with 7 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 @@ -95,3 +95,10 @@ git checkout <commit_sha> ``` git checkout -- a // a is directory ``` ### Empty commit ``` git commit --allow-empty -m "Trigger" git push --force ``` -
ufukomer revised this gist
Feb 16, 2017 . 1 changed file with 1 addition and 2 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 @@ -93,6 +93,5 @@ git checkout <commit_sha> ### Directory hard reset (have not tried yet) ``` git checkout -- a // a is directory ``` -
ufukomer revised this gist
Feb 16, 2017 . 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 @@ -88,4 +88,11 @@ git reset --hard origin/master ``` git clone -n <repo_name> git checkout <commit_sha> ``` ### Directory hard reset (have not tried yet) ``` git checkout -- a ``` a is diretory. -
ufukomer revised this gist
Nov 4, 2016 . 1 changed file with 23 additions and 13 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 @@ -4,9 +4,11 @@ ### Push ``` $ git add . $ git commit -m "Your message" $ git push -u origin master ``` ### Force push @@ -18,13 +20,19 @@ ### Remove commit ``` $ git reset --hard HEAD~1 $ git push origin HEAD --force ``` ### Remove file from repositery (not from local) ``` $ git rm -r --cached some-directory $git commit -m 'Remove the now ignored directory "some-directory"' $ git push origin master ``` ### md syntax @@ -34,11 +42,13 @@ https://github.com/tchapi/markdown-cheatsheet/blob/master/README.md ### remove accidently pushed (.idea) folder ``` $ echo '.idea' >> .gitignore $ git rm -r --cached .idea $ git add .gitignore $ git commit -m '(some message stating you added .idea to ignored entries)' $ git push ``` ### edit old pushed commit message -
ufukomer revised this gist
Nov 4, 2016 . 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 @@ -54,13 +54,13 @@ then run: `$ git push --force` ### Git rebase - `$ git rebase develop` - `$ git add -u` - `$ git rebase --continue` - `$ git push --force origin sample(your branch name)` [Stackoverflow](http://stackoverflow.com/questions/11563319/git-rebase-basics) -
ufukomer revised this gist
Nov 4, 2016 . No changes.There are no files selected for viewing
-
ufukomer revised this gist
Nov 4, 2016 . 1 changed file with 21 additions and 24 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,33 +1,30 @@ ### Clone respotory to your pc `$ git clone 'ssh clone url'` ### Push `$ git add .` `$ git commit -m "Your message"` `$ git push -u origin master` ### Force push `$ git push origin master --force` ### Pull `$ git pull` ### Remove commit `$ git reset --hard HEAD~1` `$ git push origin HEAD --force` ### Remove file from repositery (not from local) `$ git rm -r --cached some-directory` `$git commit -m 'Remove the now ignored directory "some-directory"'` `$ git push origin master` ### md syntax @@ -37,16 +34,16 @@ https://github.com/tchapi/markdown-cheatsheet/blob/master/README.md ### remove accidently pushed (.idea) folder `$ echo '.idea' >> .gitignore` `$ git rm -r --cached .idea` `$ git add .gitignore` `$ git commit -m '(some message stating you added .idea to ignored entries)'` `$ git push` ### edit old pushed commit message http://schacon.github.io/history.html then run: `$ git push --force` ### update forked repository @@ -57,13 +54,13 @@ then run: git push --force ### Git rebase 1 - `$ git rebase develop` 1 - `$ git add -u` 1 - `$ git rebase --continue` 1 - `$ git push --force origin sample(your branch name)` [Stackoverflow](http://stackoverflow.com/questions/11563319/git-rebase-basics) -
ufukomer revised this gist
Nov 4, 2016 . No changes.There are no files selected for viewing
-
ufukomer revised this gist
Nov 4, 2016 . 1 changed file with 3 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 @@ -5,7 +5,9 @@ git clone 'ssh clone url' ### Push git add . git commit -m "Your message" git push -u origin master ### Force push @@ -19,6 +21,7 @@ git pull ### Remove commit git reset --hard HEAD~1 git push origin HEAD --force ### Remove file from repositery (not from local) -
ufukomer revised this gist
Sep 22, 2016 . 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 @@ -71,4 +71,11 @@ git fetch --all git reset --hard origin/master ``` [Stackoverflow](http://stackoverflow.com/a/8888015/3650955) ### Clone with specific commit ``` git clone -n <repo_name> git checkout <commit_sha> ``` -
ufukomer revised this gist
Jun 24, 2016 . 1 changed file with 10 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 @@ -62,4 +62,13 @@ then run: git push --force - `$ git push --force origin sample(your branch name)` [Stackoverflow](http://stackoverflow.com/questions/11563319/git-rebase-basics) ### Git Reset Origin ``` git fetch --all git reset --hard origin/master ``` [Stackoverflow](http://stackoverflow.com/a/8888015/3650955) -
ufukomer revised this gist
Jun 15, 2016 . 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 @@ -54,12 +54,12 @@ then run: git push --force ### Git rebase - `$ git rebase develop` - `$ git add -u` - `$ git rebase --continue` - `$ git push --force origin sample(your branch name)` [Stackoverflow](http://stackoverflow.com/questions/11563319/git-rebase-basics) -
ufukomer revised this gist
Jun 15, 2016 . 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 @@ -54,12 +54,12 @@ then run: git push --force ### Git rebase 1 - `$ git rebase develop` 1 - `$ git add -u` 1 - `$ git rebase --continue` 1 - `$ git push --force origin sample(your branch name)` [Stackoverflow](http://stackoverflow.com/questions/11563319/git-rebase-basics) -
ufukomer revised this gist
Jun 15, 2016 . 1 changed file with 4 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 @@ -53,9 +53,13 @@ then run: git push --force ### Git rebase 1- `$ git rebase develop` 1- `$ git add -u` 1- `$ git rebase --continue` 1- `$ git push --force origin sample(your branch name)` [Stackoverflow](http://stackoverflow.com/questions/11563319/git-rebase-basics) -
ufukomer revised this gist
Jun 15, 2016 . 1 changed file with 5 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 @@ -53,8 +53,9 @@ then run: git push --force ### Git rebase 1- `$ git rebase develop` 1- `$ git add -u` 1- `$ git rebase --continue` 1- `$ git push --force origin sample(your branch name)` [Stackoverflow](http://stackoverflow.com/questions/11563319/git-rebase-basics) -
ufukomer revised this gist
Jun 15, 2016 . 1 changed file with 4 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 @@ -53,4 +53,8 @@ then run: git push --force ### Git rebase `$ git rebase develop` `$ git add -u` `$ git rebase --continue` `$ git push --force origin sample(your branch name)` [Stackoverflow](http://stackoverflow.com/questions/11563319/git-rebase-basics) -
ufukomer revised this gist
Jun 9, 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 @@ -48,4 +48,9 @@ then run: git push --force ### update forked repository - [How do I update a GitHub forked repository?](http://stackoverflow.com/a/7244456/3650955) - [Pull new updates from original GitHub repository into forked GitHub repository](http://stackoverflow.com/a/3903835/3650955) ### Git rebase [Stackoverflow](http://stackoverflow.com/questions/11563319/git-rebase-basics) -
ufukomer revised this gist
Jun 2, 2016 . 1 changed file with 2 additions and 2 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 @@ -47,5 +47,5 @@ then run: git push --force ### update forked repository - [How do I update a GitHub forked repository?](http://stackoverflow.com/a/7244456/3650955) - [Pull new updates from original GitHub repository into forked GitHub repository](http://stackoverflow.com/a/3903835/3650955) -
ufukomer revised this gist
Jun 2, 2016 . 1 changed file with 19 additions and 10 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,42 +1,51 @@ ### Clone respotory to your pc git clone 'ssh clone url' ### Push git add . git commit -m "Your message" git push -u origin master ### Force push git push origin master --force ### Pull git pull ### Remove commit git reset --hard HEAD~1 git push origin HEAD --force ### Remove file from repositery (not from local) git rm -r --cached some-directory git commit -m 'Remove the now ignored directory "some-directory"' git push origin master ### md syntax https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet https://confluence.atlassian.com/display/STASH/Markdown+syntax+guide https://github.com/tchapi/markdown-cheatsheet/blob/master/README.md ### remove accidently pushed (.idea) folder $ echo '.idea' >> .gitignore $ git rm -r --cached .idea $ git add .gitignore $ git commit -m '(some message stating you added .idea to ignored entries)' $ git push ### edit old pushed commit message http://schacon.github.io/history.html then run: git push --force ### update forked repository [How do I update a GitHub forked repository?](http://stackoverflow.com/a/7244456/3650955) [Pull new updates from original GitHub repository into forked GitHub repository](http://stackoverflow.com/a/3903835/3650955) -
ufukomer renamed this gist
Jun 2, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
ufukomer revised this gist
Jun 2, 2016 . 1 changed file with 5 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,8 @@ $ git push // edit old pushed commit message http://schacon.github.io/history.html then run: git push --force // update forked repository [How do I update a GitHub forked repository?](http://stackoverflow.com/a/7244456/3650955) [Pull new updates from original GitHub repository into forked GitHub repository](http://stackoverflow.com/a/3903835/3650955) -
ufukomer revised this gist
May 16, 2016 . 1 changed file with 5 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 @@ -31,4 +31,8 @@ $ echo '.idea' >> .gitignore $ git rm -r --cached .idea $ git add .gitignore $ git commit -m '(some message stating you added .idea to ignored entries)' $ git push // edit old pushed commit message http://schacon.github.io/history.html then run: git push --force -
ufukomer revised this gist
May 9, 2016 . 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 @@ -24,4 +24,11 @@ git push origin master // md syntax https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet https://confluence.atlassian.com/display/STASH/Markdown+syntax+guide https://github.com/tchapi/markdown-cheatsheet/blob/master/README.md // remove accidently pushed (.idea) folder $ echo '.idea' >> .gitignore $ git rm -r --cached .idea $ git add .gitignore $ git commit -m '(some message stating you added .idea to ignored entries)' $ git push -
ufukomer revised this gist
Aug 23, 2015 . 1 changed file with 5 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,6 +16,11 @@ git pull git reset --hard HEAD~1 git push origin HEAD --force // Remove file from repositery (not from local) git rm -r --cached some-directory git commit -m 'Remove the now ignored directory "some-directory"' git push origin master // md syntax https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet https://confluence.atlassian.com/display/STASH/Markdown+syntax+guide -
ufukomer renamed this gist
May 14, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes.
NewerOlder