New Bash Alias: Git Out

Up until now, we only had git commit and git push. But what about git out? If you know what it feels like to be left out, you should empathize with this command. Even though it is a part of this legendary trio, it is never actually used.

But not today…


This content originally appeared on DEV Community and was authored by Parth Agarwal

Up until now, we only had git commit and git push. But what about git out? If you know what it feels like to be left out, you should empathize with this command. Even though it is a part of this legendary trio, it is never actually used.

But not today, Not anymore!
Let's right the wrongs of this society!
So, if you are with me!

Open Your .bashrc File!

nano ~/.bashrc

Add This Line! & Save it! (ctrl+x, y, return)

git() { if [[ $@ == "out" ]]; then command "exit"; else command git "$@"; fi; }

And Finally! Source it!

source ~/.bashrc

Good job! Be Proud! Because of you, there is one less lonely command.

PS: Feel free to share any meme command out there.


This content originally appeared on DEV Community and was authored by Parth Agarwal


Print Share Comment Cite Upload Translate Updates
APA

Parth Agarwal | Sciencx (2021-04-20T16:59:55+00:00) New Bash Alias: Git Out. Retrieved from https://www.scien.cx/2021/04/20/new-bash-alias-git-out/

MLA
" » New Bash Alias: Git Out." Parth Agarwal | Sciencx - Tuesday April 20, 2021, https://www.scien.cx/2021/04/20/new-bash-alias-git-out/
HARVARD
Parth Agarwal | Sciencx Tuesday April 20, 2021 » New Bash Alias: Git Out., viewed ,<https://www.scien.cx/2021/04/20/new-bash-alias-git-out/>
VANCOUVER
Parth Agarwal | Sciencx - » New Bash Alias: Git Out. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/04/20/new-bash-alias-git-out/
CHICAGO
" » New Bash Alias: Git Out." Parth Agarwal | Sciencx - Accessed . https://www.scien.cx/2021/04/20/new-bash-alias-git-out/
IEEE
" » New Bash Alias: Git Out." Parth Agarwal | Sciencx [Online]. Available: https://www.scien.cx/2021/04/20/new-bash-alias-git-out/. [Accessed: ]
rf:citation
» New Bash Alias: Git Out | Parth Agarwal | Sciencx | https://www.scien.cx/2021/04/20/new-bash-alias-git-out/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.