-
-
Save mbodo/5f9dacf7da39c034627a66f80d661aeb to your computer and use it in GitHub Desktop.
Revisions
-
mbodo revised this gist
Apr 1, 2017 . 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 @@ -1,4 +1,4 @@ Git - Cheatsheet =============== Global Settings -
mbodo renamed this gist
Apr 1, 2017 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
mbodo renamed this gist
Apr 1, 2017 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
mbodo renamed this gist
Apr 1, 2017 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
hofmannsven revised this gist
Oct 13, 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 @@ -19,6 +19,12 @@ Press `minus + shift + s` and `return` to chop/fold long lines! Show folder content: `ls -la` Notes ----------- Do not put (external) dependencies in version control! Setup ----------- -
hofmannsven revised this gist
Jun 17, 2016 . 1 changed file with 2 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 @@ -85,6 +85,8 @@ Go back to commit: Soft reset (move HEAD only; neither staging nor working dir is changed): `git reset --soft 073791e7dd71b90daa853b2c5acc2c925f02dbc6` Undo latest commit: `git reset --soft HEAD~ ` Mixed reset (move HEAD and change staging to match repo; does not affect working dir): `git reset --mixed 073791e7dd71b90daa853b2c5acc2c925f02dbc6` -
hofmannsven revised this gist
Jun 6, 2016 . 1 changed file with 2 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 @@ -373,6 +373,8 @@ Archive ----------- Create a zip-archive: `git archive --format zip --output filename.zip master` Export/write custom log to a file: `git log --author=sven --all > log.txt` Troubleshooting ----------- -
hofmannsven revised this gist
Oct 19, 2015 . 1 changed file with 11 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 @@ -384,4 +384,14 @@ Security ----------- Hide Git on the web via `.htaccess`: `RedirectMatch 404 /\.git` (more info here: http://stackoverflow.com/a/17916515/1815847) Large File Storage ----------- Website: https://git-lfs.github.com/ Install: `brew install git-lfs` Track `*.psd` files: `git lfs track "*.psd"` (init, add, commit and push as written above) -
hofmannsven revised this gist
Jul 29, 2015 . 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 @@ -383,5 +383,5 @@ Ignore files that have already been committed to a Git repository: http://stacko Security ----------- Hide Git on the web via `.htaccess`: `RedirectMatch 404 /\.git` (more info here: http://stackoverflow.com/a/17916515/1815847) -
hofmannsven revised this gist
Jul 29, 2015 . 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 @@ -384,4 +384,4 @@ Security ----------- Prevent access to `.git` folders via `.htaccess`: `RedirectMatch 404 /\.git` (more info here: http://stackoverflow.com/a/17916515/1815847) -
hofmannsven revised this gist
Jul 29, 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 @@ -377,4 +377,11 @@ Create a zip-archive: `git archive --format zip --output filename.zip master` Troubleshooting ----------- Ignore files that have already been committed to a Git repository: http://stackoverflow.com/a/1139797/1815847 Security ----------- Prevent access to `.git` folders via `.htaccess`: `RedirectMatch 404 /\.git` (more in here: http://stackoverflow.com/a/17916515/1815847) -
hofmannsven revised this gist
Jul 14, 2015 . 1 changed file with 3 additions and 3 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 @@ -300,13 +300,13 @@ Show all released versions with comments: `git tag -l -n1` Create release version: `git tag v1.0.0` Create release version with comment: `git tag -a v1.0.0 -m 'Message'` Checkout a specific release version: `git checkout v1.0.0` Collaborate -
hofmannsven revised this gist
Jul 14, 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 @@ -369,6 +369,11 @@ Delete remote branch (push nothing): `git push origin --delete branchname` Archive ----------- Create a zip-archive: `git archive --format zip --output filename.zip master` Troubleshooting ----------- -
hofmannsven revised this gist
Jul 6, 2015 . 1 changed file with 7 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 @@ -366,4 +366,10 @@ Clone specific branch to localhost: Delete remote branch (push nothing): `git push origin :branchname` or: `git push origin --delete branchname` Troubleshooting ----------- Ignore files that have already been committed to a Git repository: http://stackoverflow.com/a/1139797/1815847 -
hofmannsven revised this gist
Feb 16, 2015 . 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 @@ -45,7 +45,7 @@ General Initialize Git: `git init` Get everything ready to commit: `git add .` Get custom file ready to commit: -
hofmannsven revised this gist
Jan 20, 2015 . 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 @@ -318,10 +318,10 @@ Show remote: Show remote details: `git remote -v` Add remote origin from GitHub project: `git remote add origin https://github.com/user/project.git` Add remote origin from existing empty project on server: `git remote add origin ssh://[email protected]/path/to/repository/.git` Remove origin: -
hofmannsven revised this gist
Dec 2, 2014 . 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 @@ -63,7 +63,7 @@ Remove files from Git: Update all changes: `git add -u` Remove file but do not track anymore: `git rm --cached index.html` Move or rename files: -
hofmannsven revised this gist
Nov 21, 2014 . 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 @@ -286,6 +286,9 @@ Compare without caring about all spaces: Useful comparings: `git diff --stat --summary 6eb715d..HEAD` Blame: `git blame -L10,+1 index.html` Releases & Version Tags ----------- -
hofmannsven revised this gist
Sep 10, 2014 . 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 @@ -318,6 +318,9 @@ Show remote details: Add remote origin from GitHub: `git remote add origin https://github.com/user/project.git` Add remote origin from server: `git remote add origin ssh://[email protected]/path/to/repository/.git` Remove origin: `git remote rm origin` -
hofmannsven revised this gist
Jul 8, 2014 . 1 changed file with 4 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 @@ -152,9 +152,12 @@ Merge to master (only if fast forward): Merge to master (forc a new commit): `git merge --no-ff branchname` Stop merge (in case of conflicts): `git merge --abort` Stop merge (in case of conflicts): `git reset --merge` // prior to v1.7.4 Stash ----------- -
hofmannsven revised this gist
May 13, 2014 . 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 @@ -336,6 +336,12 @@ Push to default: Fetch: `git fetch origin` Pull: `git pull` Pull specific branch: `git pull origin branchname` Merge fetched commits: `git merge origin/master` -
hofmannsven revised this gist
Feb 27, 2014 . 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 @@ -346,6 +346,9 @@ Clone to localhost: Clone to localhost folder: `git clone https://github.com/user/project.git ~/dir/folder` Clone specific branch to localhost: `git clone -b branchname https://github.com/user/project.git` Delete remote branch (push nothing): `git push origin :branchname` or: `git push origin --delete branchname` -
hofmannsven revised this gist
Feb 3, 2014 . 1 changed file with 3 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 @@ -6,7 +6,9 @@ Global Settings Related Setup: https://gist.github.com/hofmannsven/6814278 Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/ Interactive Beginners Tutorial: http://try.github.io/ Reminder -
hofmannsven revised this gist
Jan 27, 2014 . 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 @@ -344,6 +344,6 @@ Clone to localhost: Clone to localhost folder: `git clone https://github.com/user/project.git ~/dir/folder` Delete remote branch (push nothing): `git push origin :branchname` or: `git push origin --delete branchname` -
hofmannsven revised this gist
Jan 8, 2014 . 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 @@ -288,9 +288,15 @@ Releases & Version Tags Show all released versions: `git tag` Show all released versions with comments: `git tag -l -n1` Create release version: `git tag v1.0` Create release version with comment: `git tag -a v1.0 -m 'Message'` Checkout a specific release version: `git checkout v1.0` -
hofmannsven revised this gist
Dec 8, 2013 . 1 changed file with 13 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 @@ -282,6 +282,19 @@ Useful comparings: `git diff --stat --summary 6eb715d..HEAD` Releases & Version Tags ----------- Show all released versions: `git tag` Create release version: `git tag v1.0` Checkout a specific release version: `git checkout v1.0` Collaborate ----------- -
hofmannsven revised this gist
Oct 16, 2013 . 1 changed file with 0 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 @@ -16,8 +16,6 @@ Press `minus + shift + s` and `return` to chop/fold long lines! Show folder content: `ls -la` Setup ----------- -
hofmannsven revised this gist
Oct 13, 2013 . 1 changed file with 2 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 @@ -6,6 +6,8 @@ Global Settings Related Setup: https://gist.github.com/hofmannsven/6814278 Interactive Tutorial: http://try.github.io/ Reminder ----------- -
hofmannsven revised this gist
Oct 7, 2013 . 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 @@ -58,6 +58,9 @@ Add and commit in one step: Remove files from Git: `git rm index.html` Update all changes: `git add -u` Kepp file but do not track anymore: `git rm --cached index.html` -
hofmannsven revised this gist
Oct 4, 2013 . 1 changed file with 2 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 @@ -316,7 +316,8 @@ Merge fetched commits: `git merge origin/master` Clone to localhost: `git clone https://github.com/user/project.git` or: `git clone ssh://[email protected]/~/dir/.git` Clone to localhost folder: `git clone https://github.com/user/project.git ~/dir/folder`
NewerOlder