How to create a new git repository, and initialization code

1, git server daemon to create a new repository name, this time will generate path repository: https: //gitserver.test.com/waimai/test111.git

2. Find a local code directory, open the git command window, execute the following command

  • touch README.md   

  • git init (initialization warehouse)
  • git add -A
  • git commit -m "initialization code"
  • git remote add origin https://gitserver.test.com/waimai/test111.git

  • git push -u origin master

Note: This is the final step in the implementation of the push, the following error may occur:

remote: User permission denied
fatal: unable to access 'https://gitserver.test.com/test.git/': The requested URL returned error: 403

 

The reason this error is because the current account without administrative rights resulting from this warehouse, directly to the git server daemon to add this account to manage collaborators inside, then perform push on it!

Guess you like

Origin www.cnblogs.com/gramblog/p/11589527.html