Skip to content

Latest commit

 

History

History
66 lines (39 loc) · 1.75 KB

File metadata and controls

66 lines (39 loc) · 1.75 KB

Establish Git Connection:

  1. Checking for existing SSH keys https://help.github.com/articles/checking-for-existing-ssh-keys/
  2. Generating a new SSH key and adding it to the ssh-agent: https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it -to-the-ssh-agent/
  3. Testing your SSH connection: https://help.github.com/articles/testing-your-ssh-connection/

How to sync a file to Git?

git add git commit -m "" git pull git push


How to remove a file from remote?

git rm -r -f git commit -m "delete some files" git push origin master


How to Adding an existing project to GitHub using the command line?

link

git init git add . git commit -m git remote add origin git remote -v git pull git push origin master

You might have this error when you do git pull:

There is no tracking information for the current branch. Please specify which branch you want to merge with. See git-pull(1) for details.

git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

git branch --set-upstream-to=origin/<branch> master

Try this: git pull origin master --allow-unrelated-histories link

git branch --set-upstream-to=origin/master master link


Reference: