Git detached head

Most of the time, HEAD points to a branch name. When you add a new commit, your branch reference is updated to point to it, but HEAD remains the same. When you change branches, HEAD is updated to point to the branch you’ve switched to. All of that means that, in these scenarios, HEAD is …

How to upload project to another GitHub repo

Sometimes we may combine our own project with a GitHub remote repository, it may be school repo or work repo. However, what if you want to upload the project into your own repository for future review? Try this: git remote rename origin upstream git remote add origin URL_TO_GITHUB_REPO git push origin master

Permission to one repository denied to another(unwanted) git account

My personal solution to solve this problem is: 1. Check the credentials ssh -T git@github.com The name printed out should be your wanted user name. If not, go step 2. 2. Connect ssh. cd ~/.ssh 3. Connect to wanted ssh ssh-add ~/.ssh/id_rsa_account1 4. Check the connected ssh list ssh-add -l If there shows your wanted …