Start a new project by building a new library in an existing Git repository and uploading the local git repository to the remote server's Git repository
first , create a new folder on the local ABC, enter into ABC, and then git init. This initializes a git project ABC locally.
then , log on to the remote git server, under the Gitrepo directory,mkdir abc.git. Then enter the Abc.git directory. git--bare init. This creates an empty Git project on the server side.
then , on the local, go to the ABC directory and add the remote repository. git remote-v displays the project's current remote repository because it is a new project, so the result is empty. git remote add Origin git://127.0.0.1/abc.git This adds the repository ABC.
finally ,commit commits the local code, andgit push origin master to upload the local git repository to the GIT repository of the remote git server.
Remote Direct local operation is also possible without logging in
1. Git init
2. Git Add.
3. Git commit-am "# # #"-------above 3 steps only local submission
4.git remote Add Origin [email protected]: Repos/xxx/xxx/xxx.git
5.git Push Origin local branch: remote Branch
Git uploads the local repository to the remote repository