Git commit code to a remote repository

Git commands

A, Git how the native code pushed to the remote repository

1. pulling branch code specified

git clone -b dev https://github.com/crazyfzw/RecycleViewWithHeader.git

2. Initialize the repository

git init

3. Add files to the repository (just added to the cache area). Add Folder on behalf of all the documents

git add .

4. Add the files to the repository, and fill out the submission Remarks

git commit -m  "first commit"

So far, we have completed the initialization native code libraries, but not yet submitted to the remote server, so the key here, to be submitted to the code on the remote server, perform the following steps:

5. The local library associated with the remote repository

git remote add origin of your remote repository address

6. Push code to the remote repository (for the first time when the push)

git push -u origin master

7. Push code to the remote repository (after the first push, to push the command directly modified)

git push origin master

 

Guess you like

Origin www.cnblogs.com/htq29study/p/12002344.html