git first push

Configuring Git for the first time

git config --global user.name "xxxx"
git config --global user.email "[email protected]"

use your repository

I just want to clone this repository

If you want to simply clone this empty repository, run this command in terminal.

git clone ssh://git@xxxxxxx

my code is ready to push

If your code is ready to be pushed to the repository, execute this command in the terminal

cd existing-project
git init
git add --all
git commit -m "Initial Commit"
git remote add origin ssh://git@xxxxxxx
git push -u origin master

My code is already tracked by Git

If your code is already tracked by Git, then set this repository as your "origin" push.

cd existing-project
git remote set-url origin ssh://git@xxxxxxxx
git push -u origin master

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325251769&siteId=291194637