Some of Git's basic commands
Common git commands
Make sure that you have installed the GIT client
General Configuration
git--version //view git version info
git config--global u
There are many installation tutorials for installing Git online, so you can refer to them. Here is the version of Git with Windows, click here to download. After the basic setup is complete, you can see the new git commands added by right-clicking the mouse button: Git GUI h
Common Git commands
For the Git basic tutorial, refer to the next article: Git basic tutorial.
Category
Specific commands
Local submission
Initialize the Repository: git init
Add the fil
branch-D branch name (delete Branch)Git branch-D branch name (Force Delete Branch)Git pull (capture the latest commit)Git Branch -- Set-upstream Dev origin/dev (specify the connection between the local branch and the remote Branch)Git reset head readme.txt (clear readme.txt content in the temporary storage area)
Common GIT Commands summaryWith R brother came to the new company (a transition from hardware to the Internet company), the new company's previous code is basically using SVN version control, and even some code is not version control, so called Hg did a git share, ready to put all the company's code git version control
These operation commands are from Liaoche Teacher's official online to see the PostScript down, the following is the official website of Liao Xuefeng Teacher, we can see, tutorials good ~http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b0001. Install Git on Windows: http://msysgit.github.io/default installation is available, open Git-
, start with Git stash list, and then restore the specified stash' Git stash apply [email protected]{1} ' to remove your specified version number as [email protected]{1}, stash content is not deleted, use git stash drop to deleteBranch switching, updating issuesEsc,esc.: q! EnterView remote repositories: $ git remote-v
One, git configuration aliasGIT commands some commands that are longer or faster, and can command abbreviations, or aliases. If you knock on it, it's git st git status a lot easier, and of course we are very much in favor of this lazy approach.$
This article is an introductory article on git and a learning note for individuals. The level of understanding involved will not be too high, but it will also include as much as possible the relevant commands for our daily use. 1: Environment Description:System: Centos 7Git version 1.8.3.1Ssh-6.4p1gitbub:https://github.com/to 2015-04-042:git operation "Initialize
following three commands will only get a commit.
git commit–m quot;add readme.txtquot;
git add Readme_forgotten
Git commit–amend
17. If you have already used git add, add the modified files A, B to staging area, now you just want to submit a file, do n
Git should save more developers ' jobs than other technologies. As long as you often use Git to save your work, you'll always have the opportunity to return the code to the previous state, so you can undo the mistakes you made in the middle of the night.
In spite of that, Git's command-line interface is a tricky one to grasp. Next, give you 7 tips to maximize the role of
all changes to the current repos git add [file name] Add a file to git indexgit commit-v When you use the-v parameter you can see the difference of commit git commit-m "This is the message describing the commit" add commit information git commit -A-A is for add, add all the changes to
git command line configuration1 Installing GitHub2 Installing Msysgit3 To configure the user name and fuel tankgit config--global user.name My command is: git config--global user.name Mchdbaghgit config--global user.email My command is: git config--global [email protected]4 Verifying that there is no remote server connectedssh-t [email protected]5 to generate SSH
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 Git commands I've compiled. Several special nouns are translated as follows.
Workspace: Work Area
Index/s
Wen/NanyiI 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 Git commands I've compiled. Several special nouns are translated as follows.
Workspace: Work Area
Summarize git version control commands commonly used in daily development and production------------------------------Main--------------------------------Pole Guest Town BuildingTo create a repository$ git clone $ git init #初始化本地版本库Ii. Modification and Submission$
://zhidao.baidu.com/question/1669154493305991627.html
Some error handling"Pathspec ' branch ' didn't ' match any file (s) known to Git." Errorgit checkout mastergit pullgit checkout New_branchThis error may occur when using Git to submit larger filesError:rpc failed; result=22, HTTP code = 411 fatal:the Remote End hung up unexpectedly fatal:the remote end hung up unexpectedly everythin G up-to-dateIn t
modify someone else's code, we want to see who wrote the particular line of the file, and we can use blame (blame, to hold it accountable).
git blame file
After you execute the above command, each row will show who submitted the specific, and you can flip the page with the paging key.
git command alias settings
Do you think it's a bit troublesome to knock on
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.