git code version management to use based on gitee

pdf

Instructions for use git

  1. Environmental equipped
    • git Download
    • Open git bashinto the one you feel appropriate directory, files in this directory is stored in git.
    • Generate a key [ id_rsa ] and [public key id_rsa.pub ]
      • ssh -keygen -t rsa -C "你的码云账号"Command will change the current directory to create the .ssh directory, and generates the key [ id_rsa ] and [public key id_rsa.pub ], each prompt, press ENTER to (3 times), the directory also [ known_hosts ] file, known_hosts back operation will be prompted to create, select yes.
    • Set global user name and account number
      • git config --global user.name "码云用户名"
      • git config --global user.email "码云登录账号"
    • ssh link command ssh -T [email protected], this place will be asked to create the known_hosts, yes it
    • First performed in your sync folder git init, and then execute the command git remote add orgin https://gitee.com/xxxxxx.
      • orgin can easily take the name
      • https://gitee.com/xxxxxx your cloud account code address
    • git remote add gitee [email protected]:用户名/项目名称.git(Italics can be copied to the repository cloud code)
      Screenshot cloud code
  2. Use (in the following operations are synchronized folder operations)
    • Use git statusView File StatusViewing File Status
    • The specified file is added to the buffer (including the new file and modification) git add 文件1, a plurality of files git add 文件1 文件2 文件3.
    • Add all the files to the buffer (including new and modified files) git add .== git add --all==git add -A
    • After the file is added to the modified buffer git add --update==git add -ugit add command modifier
    • Restore did not commit a file git reset 文件1, multiple files git reset 文件1 文件2, restore all filesgit reset HEAD|版本号
    • Submission of documents to the cache fetch git commit -m 备注信息.
    • Restore files submitted to the buffer, the first step: git log --onelineto find the version number, the second step. git reset 版本号,
    • Before the push, merge git pull --rebase origin master, and then pushed to the remote management server versiongit push
Published 12 original articles · won praise 0 · Views 470

Guess you like

Origin blog.csdn.net/w0iloveyou/article/details/103616470
Recommended