Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What commands need to be memorized in Git?

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly shows you "which commands need to be memorized in Git". The content is simple and clear. I hope it can help you solve your doubts. Let the editor lead you to study and learn what commands need to be memorized in Git.

Related to the submission process

View file changes and new files

Git status

Add new files

Git add your_file_path / / add all files git add * / / add a certain type of file git add dir/*.js

A simple submission

Git commit-m "Commit message"

Submit all your modifications and additions

Git commit-am 'your message'

Undo and modify a file

Git checkout--

Discard all local changes

Git fetch origin git reset-hard origin/master

Update related

Update remote code

Git pull

Show merge conflict files

Git diff

View a merge conflict file

Git diff-base

Add a post-conflict resolution file

Git add

Submit your changes to the trunk

Git push origin master

Branch correlation

Create a new branch and cut to it

Git checkout-b your_branch_name

Switch branch

Git checkout your_branch_name

View the branch and the list of branches

Git branch

Submit to a branch

Git push origin your_branch_name

Contrast branching difference

Git diff

Merge a branch into your current branch

Git merge your_branch_name

Delete a branch of a remote warehouse

Git push origin: your_branch_name

Delete a branch

Git branch-d your_branch_name

Label and project initialization

Git init initialization project name git tag 0.9.1

Configuration

Configure your user name and mailbox

Git config-- global user.name "Jack" git config-- global user.email jack@gmail.com is all the contents of this article "what are the commands to remember in Git?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report