From 0 to 1, to a local remote procedure git

From 0 to 1, to a local remote procedure git

  1. Remember must be submitted in a file folder code git init, not only what you use
    tortoisegit what tools, or you are in an environment already add the idea, but you still need to right-click the folder in the current file git bash here, provided that you do not need to idea you submit to the warehouse or, idea warehouses need to be replaced, do not apply.
  2. When git initlater, can be found in the folder appears under the .githidden files, then you can git statusview the contents of the current folder:
  3. After a review is complete, if you need to submit single or multiple files using the time git add 文件1,文件2,。。。but if you are required to submit all the documents directly git add .submit all documents as:
  4. After submission, you should commit to your local repository: git commit -m remarks information, attention to the need quotation marks. Figure:
  5. After adding to the local repository, and the need to associate the remote repository: It is recommended to use ssh to submit
    git remote add origin ssh your name, you can directly copy over.

  6. After linking remote repository, use push to a remote repository: This is only the first time you need to add the information u

    git push -u orgin master
  7. If there is follow-up documents need to be submitted to the remote library, you can use the command directly:

    git push origin master


Summary

git init:初始化仓库
git add README.md:添加文件
git commit -m "first commit" 添加文件到本地仓库
git remote add origin [email protected]:mlh1421/baidu-mission.git : 关联远程仓库
git push -u origin master 第一次提交到远程仓库的文件
git push origin master:第二次+n提交到远程仓库的文件

Guess you like

Origin www.cnblogs.com/chenyameng/p/11366832.html