git learning

Git

  • delete branch
    git branch -D
  • switch branch
    git checkout
  • View branch
    git branch
  • Create branch
    git checkout -b
  • View status
    git status
  • Add modified data to the buffer
    git add
  • Submit changes to the local branch
    git commit -m 'annotation'
  • Commit the local branch to the remote branch
    git push origin
  • Set global variables
    git config –global user.email
    git config –global user.name
  • update local branch
    git pull origin
  • Create key
    ssh-ketgen -t rsa -C
  • Remote connection
    git remote add origin
  • Compare different
    git diff between branches branch 1 branch 2
  • merge
    git merge
  • Tag
    git tag -a version number -m annotation
  • Push version
    git push origin
  • delete git remote branch
    git push origin --delete
  • Get the tag
    git tag
  • Remove local tags
    git tag -d
  • Delete remote tag
    git push origin --delete tag
  • After the locally modified code is
    cached by git stash, nothing to comming will be prompted when viewing the records in git status, and if working tree clean is successful, the cache will be successful.
  • View cached snippets
    git stash list
  • Restore cached code
    git stash apply stash@{x}
  • View commit log
    git log

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324727022&siteId=291194637