Yes even with code generators we all need git everyday. So outside of the regular git commit and pull / push here are things we all get stuck with and git commands cheatsheet to handle them.
Create & upload to new branch:
git checkout -b new_branch name
git add .
git commit -m “ Message”
git push origin branch
Connect server to git using SSH
Create ssh key on local machine (ssh-keygen)
Copy & paste public key to git. In bitbucket its added to your profile not a single repository
On local machine run start ssh agent
eval $(ssh-agent)
Add ssh key to agent
ssh-add ~/.ssh/<private_key_file>
Test the ssh connect to bitbucket
ssh -T git@bitbucket.org
Get git to refresh repo after changing gitignore
Make changes in .gitignore file.
Run git rm -r --cached . command.
Run git add . command
git commit -m "Commit message" or just git commit or continue working.
Find all files with extension:
find /etc -name "*.conf"
Push all branches to new remote
git fetch --prune
git branch -r | grep -v '\\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all
git remote add upstream <the-url-path-of-a-remote.git>
git push --all upstream
git push --tags upstream
Upload large files to git
git config http.postBuffer 52428800