Git very much commands to use notes

Source: Internet
Author: User

1: Modify User.Name and User.email that have submitted N-Times code

Fix me in multiple computers, using different accounts, git config global,system,local configuration ignored changes, and added a number of computer SSH key default submission problem.

# Two copies perform the following two lines

git filter-branch-f--env-filter "git_author_name= ' Wujuguang '; Git_author_email= ' [EMAIL protected] ';
Git_committer_name= ' Wujuguang '; Git_committer_email= ' [EMAIL protected] '; HEAD

# Force Update

Git push Origin master-f

2: A branch commits to another branch
A commit on the local dev branch, how do I put it on a local Ky-dev branch?

Git uses Cherry-pick.
Simple usage: git cherry-pick <commit id>

Apply the changes introduced by some existing commits.
is to apply the existing commit (which is understood to be resubmitted)

Checkout to this dev branch, use git log to get the commit <commit Id>, assume 6211d4912ec6752ee39b1c7b3ef9c76d01c2a49e, and then do the following:
$ git checkout Ky-dev
$ git Cherry-pick 6211d4912ec6752ee39b1c7b3ef9c76d01c2a49e
$ git log

Git very much commands to use notes

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.