Common git operation command (Common operation)

win10 clear the registered account password method

  • Open Control Panel (Control Panel);
  • Select the user account (User Accounts);
  • Select Manage your credentials (Credential Manager);
  • Management windows credentials (Manage Windows Credentials);
  • Git delete saved user information can be saved.

git common commands

  • git log --pretty = oneline can get all historical versions
  • git reset --hard id ... id can be forced to return to the specified version
  • git push --force can be forced to push the current code line
  • git reflog will record the history of all HEAD, that is when you do reset, checkout and other operations, these operations will be recorded in the reflog
  • git reset -hard idxxx .. forced to make a version of the code to restore
  • git diff for comparing the code difference without comparing the default parameter work area and temporary area used git diff commit-id [<path> ...] can be difference between the work area and the specified version
  • git stash back up the contents of the current work area, reading relevant content from a recent submission, so that the work area to ensure consistency with the text and the last submission. At the same time, to save the current workspace content to Git stack.
  • git stash pop [list / clear] to read the last saved content from Git stack, reinstate the work area. Because there may be multiple Stash of content, so use to manage the stack, pop reads content from a recent stash and recovery.
  • After the git stash pop to normal after the code merge conflict commit operation
  • git branch branchName used to create a new branch
  • git checkout branchName switched over to this branch to

Guess you like

Origin www.cnblogs.com/universe-cosmo/p/10965516.html