git simple command finishing

git belt: working directory -> staging area -> Storage -> Remote
Configuration operations: config --global user.name git
                 git config --global user.email
 commit operation: git init initialize
     git status to view the current status
     git add file to add from the working directory to the staging area
     git commit -m description from scratch added to the repository
     git log to view the records submitted to
undo: git checkout file withdraw from scratch, and return to the working directory, but the staging area still has the file
     rm --cached file is deleted from the staging area, git cancel the file management, but it is still working directory
     when git reset --hard id revocation submitted to the warehouse, to restore the working directory to the corresponding id
Branch: bug fixes for module development to develop a new branch, and the submission of documents, return to the main branch after submitting the same file
   git branch to branch to view the Branch Primary Master
        git branch to branch in the name of the current branch
   git checkout to switch the name of the branch
     git merge source branches merge branch 
     git branch -d name deleted branches (-D forced to delete)
Temporarily save the changes: to save the changes to the staging area on a clipboard, then empty the temporary storage area, you can switch to other branches operating
             git stash to store temporary changes
                        git stash pop restore changes
Remote repository: git remote add origin address to add a remote repository alias Origin
      git push addresses (alias) name of the branch pushed to the remote repository
      git push -u origin master -u to remember names and address of the warehouse, after just git push 
Collaborative Development: B Programmers: git clone address cloning remote warehouse development submitted
       A programmer: git pull origin master remote repository to pull in the synchronization code push push
        

Guess you like

Origin www.cnblogs.com/litiane/p/12651062.html