Git basic commands

Source: Internet
Author: User


Git pull Update
Git Status View file status
git Add. Add all
Git commit-a-M "xxxx" commit
Git push push to server
git diff xxx View a file difference
Git Branch View current branchgit branch-d Delete a branch
git checkout xxx switch to XXX versionCreate a Git project
Git init
git Add.The master branch cannot be used with master. I usually use new
GIT branch newgit checkout newgit branch-d Master
2. The. git/hooks/post-receive file on the server was last added:
Cd/xxxxx Project Path
Unset Git_dir
git reset--hard

3. In the. git/config file on the server, add:
Denycurrentbranch = Ignore
git commit-am ' update ' client: First clone: Git clone[email protected]Server address: Server project path cloning completed after executing git config--global push.default simple

Git basic commands

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: 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.