假設建立好了GITLAB帳號:mming

ssh-key也加入server了

 

Git global setup:

指令

  1. git config --global user.name "mming"
  2. git config --global user.email "[email protected]"


Create Repository

指令

  1. mkdir test
  2. cd test
  3. git init
  4. touch README
  5. git add README
  6. git commit -m 'first commit'
  7. git remote add origin [email protected]:mming/test.git
  8. git push -u origin master


Existing Git Repo?

  1. cd existing_git_repo
  2. git remote add origin [email protected]:mming/test.git
  3. git push -u origin master
相关文章