Skip to content

Latest commit

 

History

History
34 lines (17 loc) · 869 Bytes

File metadata and controls

34 lines (17 loc) · 869 Bytes

Git commands

Git keep asking the password everytime you pull

When git is constantly asking you to type your password, make sure to do this.

Here the details:

eval $(ssh-agent) <- start the ssh agent.

ssh-add <- you add your private key to it. Follow the steps here.

ssh-add -K <- Save key permanently.

Add a remote repository

git remote add upstream [git@github.com:[user]/[repo].git

git remote add [user] git@github.com:[user]/repo.git

Change name of a local and remote branch

Inside the branch that you want to change the name run this:

git branch -m new_branch

Then delete the old branch:

git push origin :old_branch

Push the new branch, set local branch to track the new remote

git push --set-upstream origin new_branch