Post/Code

HomeAboutUsesNow

Git Cheat Sheet.

Despite the GUI interfaces provided for working with Git by VS Code and IntelliJ, I tend to stick to the command line when working with Git. It is likely due to the fact that, while learning the Git basics, I followed the online Git tutorial and that stuck, regardless, these are some Git commands I use often:

git branch

git status

git fetch

git pull

git add .

git commit -m "Type message here"

git log -3

git remote -v

git remote add origin master

git remote remove remoteName

git set branch --set-upstream branchName remoteName/branchName

git checkout -b branchName

git checkout branchName

git clone repoUrlGoesHere

git branch -m newBranchName

git branch -m oldBranchName newBranchName

git branch -d branchName

git push remoteName branchName

git config --global --get http.proxy

git config --global --get https.proxy

git config --global --unset http.proxy

git config --global --unset https.proxy

git config --global http.proxy http://proxyUser:proxyPassword@proxyLocation.proxyTld:proxyPort

git config --global https.proxy http://proxyUser:proxyPassword@proxyLocation.proxyTld:proxyPort