Last active
March 2, 2024 08:24
-
-
Save simone-sanfratello/07aadfe8d8c3eb6acce1f8a6cfde699f to your computer and use it in GitHub Desktop.
Revisions
-
simone-sanfratello revised this gist
Mar 2, 2024 . 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 @@ -4,6 +4,12 @@ ### git - add origin named "upstream" to the forked repo ```bash git remote add upstream https://github.com/OWNER/REPOSITORY.git ``` - push the current branch, which is new ```bash @@ -19,7 +25,7 @@ git fetch origin && git checkout main && git merge upstream/main - clone a repo using a specific auth key ``` git clone [email protected]:OWNER/REPOSITORY.git --config core.sshCommand="ssh -i ~/.ssh/that-key" ``` ### docker -
simone-sanfratello revised this gist
Mar 2, 2024 . 1 changed file with 20 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 @@ -1,15 +1,31 @@ # Tips & Tricks collection ## Command aliases ### git - push the current branch, which is new ```bash alias git-push-new-branch='git push --set-upstream origin $(git branch --show-current)' ``` - sync forked repo from origin ```bash git fetch origin && git checkout main && git merge upstream/main ``` - clone a repo using a specific auth key ``` git clone [email protected]:owner/repo.git --config core.sshCommand="ssh -i ~/.ssh/that-key" ``` ### docker - stop all running containers ```bash alias docker-stop-all='docker stop $(docker ps -q)' ``` -
simone-sanfratello created this gist
Mar 2, 2024 .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,15 @@ # Tips & Tricks collection # Command aliases git - push the current branch, which is new ``` alias git-push-new-branch='git push --set-upstream origin $(git branch --show-current)' ``` docker - stop all running containers ``` alias docker-stop-all='docker stop $(docker ps -q)' ```