Delete the host name by the prompt, and then push codes again.
How to upload big files(like videos) to GitHub?
1. Down git-lfs [link](https://git-lfs.com/) 2. In command line 3. Tracking file type 4. Add gitattribute file 5. push
Making a Git push from a detached head
If you are on a detached head and you want to push to your remote branch otherwise you can create a new branch and push to it ( it will be created automatically )
fatal: ‘XXX’ could be both a local file and a tracking branch. please use — (and optionally –no-guess) to disambiguate
This is definitely an edge case but easily solved. This action calls git checkout XXX, but because you have a branch, and a folder called XXX it ends up getting confused and asks you to clarify. In an attempt to solve this I’ve used git switch to specify that you want to switch to the branch specifically.
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 add image in README for GitHub
 or <img src="relative/path/in/repository/to/image.svg" width="128"/>
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
How to send a pull request in GitHub
Sometimes we fork a repository from GitHub and change some codes for the program we fork. How could we update the repository with our changes in local workplace? Well, we could try pull request. First, we should fork the repository into our local workplace. And normally, we want to create a new branch for specific …
How to set up GitHub in Windows
Download and install latest version of git winget install –id Git.Git -e –source winget By the way if you don’t have the winget tool, to get it first. Set username in Git Open the Git Bash $ git config –global user.name "your_user_name" Check if you set up your user name successfully git config user.name Set …
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 …
Continue reading “Permission to one repository denied to another(unwanted) git account”