New projects submitted to the local remote warehouse steps

1, initialize the project, git init

2, check the project information has changed, git status

3, add new files, git add.    Note: ( Is all the new files )     or git add filename (filename) 

4, will be submitted to all the modified files to a local repository, git commit -am "comment information" Note: -a indicates that the file has not submitted all the modifications

5, this time the remote repository project yet, go to a remote warehouse to create a new project, copy down the address of the project ssh

6, add the source address, git remote add origin ssh address

7, execute git remote -v

8, and at this time there is no existing local file on the remote warehouse consolidation, execute git fetch

9, the combined local and remote, git rebase origin / master

10, the final push to the remote repository, git push origin master: master

Guess you like

Origin www.cnblogs.com/elian91/p/11109611.html