Git remote-v
Submit your modified C code
#添加当前修改的文件到暂存区
git Add.
#如果你自动追踪文件, including files that you have manually deleted with a status of deleted
Git add-u
#提交你的修改
git commit–m "your comment"
#推送你的更新到远程服务器, syntax for git push [remote na
git resolves local conflicts
The process is very simple, mainly using the git stash command for processing, divided into the following steps to deal with.
1. Store local Modifications first
$ git stashThis allows all local modifications to be temporarily stored. is to use Git stash
(reference) as a parameter to the command. git revert HEAD: Undo the most recent commit. Git revert creates a new, reverse commit that you can tell git not to commit by using parameter-N.git rmgit rm file: Removes files from the staging zone and also removes the working directory. git rm--cached: Removes files from
play the remaining patches.Git rebase--abort will terminate rebase, and the current branch will return to the state before rebase. 5. Cleanup 1) Delete
git rm "file info"//delete files from git cache
git rm file: Removes files from the staging zone and also removes the working directory.git rm--cached: Removes files from the staging area, but stays in the work
). This option allows you to reverse the already submitted thing to a state that has been updated but not committed (Updated butnot Check in). It is as if the Git-update-index command has been executed, but there is no git-commit command to perform.--hardThe contents and the index in the working tree are switched to the specified version location, which means that all the following contents and the contents
Git is a powerful distributed versioning tool that applies not only to the source code for managing large open source software (such as Linux kernel), but also to managing private documents and sources (such as: Wsi-lgame-pro)
For more information about git, please refer to my previous blog: Git version management tool
First,
of Git's unique commands:
4, some of Git's unique commands
git branch: Add, delete, and search operations on branches, such as ' Git branch new_branch ' will create a new branch called New_branch from the current working version, ' Git branch-d new_ Branch ' will force th
The current development of new projects using version control tools are basically git, old projects or SVN, online git resources are many, many and miscellaneous. I have compiled a study of git, hoping to help students who are learning about git.First, Git commands to recogn
Common git commands, git
Git statusGit add puts the workspace in the hold ZoneGit commit puts the hold zone into the version ZoneGit add submits all modified files to the hold ZoneGit commit-m "Remarks written when submitting" no referenceGit commit-a-m "Write remarks upon submission" directly submit the workspace to t
Strong push, which uses your local code to replace content in your git repository with a strong overlayGit push-fgit fetch--prune #这样就可在本地删除在远程不存在的branchMans Git-fetch--pruneAfter fetching, remove any remote tracking branches which no longer exist on the remote.-T,--tagsThe most of the tags is fetched automatically as branch heads is downloaded, but tags it does notPoint at objects reachable from the branch
that developers can submit locally under distributed Each developer machine has a server database backup file record history back to the past multi-share003. Git workflowWorkspaces: code written at work staging area: Staging, helping us save the code as a transition layer to avoid misoperation protect workspace and version area Branch processing version area: Manage version, code action in repository generates version004. Some basic Linux
similar to SVN's rm, Del
git commit: commits the changes to the current workspace, similar to the SVN commit command, such as ' Git commit-m story #3, ' Add user Model ', must be submitted with-m to enter a commit message, which is similar to SVN's commit
git push: updates the local commit code to the remote repository, such as '
Thanks to Liaoche, the great God shared git lessons
Master the following commands, basically daily enough local warehouse common operation to create a repository
Git init Add file to buffer
Git add file to warehouse
Git commit-m "Commint describtion" undo Modify or clear buf
Summary of COMMON commands
One, fallback to a node, by the following command:
Git Reset–hard HASH returns to a node without preserving modifications such as:
Git Reset–hard HASH returns to a node, preserving the modification.
Second, all the local changes. No commits are returned to the original state.
Git Checkout.
git commands, like a Linux command, are easy and quick to operate with commands. In general, the daily use just remember the following figure 6 commands, you can. But skilled use, I am afraid to remember 60~100 a command.
Here's a summary of common Git
Guide
Git is a free, open source distributed version control system for agile and efficient processing of any or small or large project. In general, you can use Git as long as you remember 6 commands. But skilled use, I am afraid to remember 60~100 a command.
Here's a list of common
Git compile installation and common commands =========================================: compiling installation and setting 1.1: Introduction GitHub website address (download source package): https://github.com/git/ Git.git git downloads on systems such as Windows Mac: Https://git
branch and switch it over
Git co-B # create a new new_branch Based on Branch
Git Co $ ID # checkout a historical commit record, but there is no branch information, switch to another branch will be automatically deleted
Git Co $ id-B # checkout a historical commit record and create a branch
Git Br-D # delete a
Guide
Git is a free, open source distributed version control system for agile and efficient processing of any or small or large project. In general, you can use Git as long as you remember 6 commands. But skilled use, I am afraid to remember 60~100 a command.
Here's a list of common
Original address: http://www.ruanyifeng.com/blog/2015/12/git-cheat-sheet.html 阮一峰日期: 2015年12月 9日I use Git every day, but I can't remember many commands.In general, the daily use of just remember 6 commands, you can. But skilled use, I am afraid to remember 60~100 a command.Here's a list of common
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.