Common commands of svn and git are commonly used: 1. gitpull // indicates updating the latest code on the server to the local device. 2.1, gitadd file path strength and file name 2.2, gitcommit-m quot; comment quot; 2.3, gitpush // The above three instructions complete code submission to the server. 3,... svn and git
sha1 is generally used), create a tag
Git tag-l list current tag
Git tag-d [tag_name] Delete tag
With the tag, you can use git checkout [tag_name]-B [branch_name] to check the code of the corresponding tag moment. You can also use the tag name to implement diff and other functions.
10. Patch usage
Git diff filename1
git branch New Branch
git checkout Switch to Branch
git checkout -b -bnew local branch and switch to branch, -t bound distal branch
Collaborative processes
First fork The remote project
Putting the fork past the project is your project clone to your local
Run to git remote add add s
Linux-common Git commands1. github Introduction
Git is a distributed version control system. It was originally written by Linus Torvalds and used for Linux kernel code management. After its launch, Git has also achieved great success in other projects, especially in the Ruby community. Currently, many well-known projec
execute the git rebase-i head~n to merge.Perform the third step before committing to the remote branch before you need to execute the git pull--rebase Origin Step three: Submit the contents of the local branch to the remote branch: $git push Origin 5. When a phase is completed and the content on its own branch is merged with the main branch, a merge request is c
1. Configure User name and password$ git config--global user.name "x"$ git config--global user.email "x"View User Name$ git config user.name2, clone a git repositoryGit can communicate through a lot of protocols, with three of the most important protocols, Ssh,http,git (a fu
Common commands of svn and git are commonly used: 1. git pull // indicates updating the latest code on the server to the local device. 2.1. git add file path strength and file name 2.2, git commit-m "comment" 2.3,
Summarize your git common commandsGit also has a period of time, the use of their usual commands with their own description of the record, convenient for their own memo is also convenient for other people to refer to.Directory:The most basic command :git clone copies and tracks the remote Master branch. The advantage o
Level four modeWorkspace Staging Area local warehouse remote Warehousegit config--global user.name "YourName"git confit--global user.email "Youremail"Git initgit Add FileGit commit-m "somecomments"git statusgit diff file to see the difference between the workspace and the local warehousegit log--pretty=onelinegit reset--hard head^ (head~100)
Definition: The following abbreviations are used in parenthesesWorkspace: Workspace (W)Staging Area: Index (I)Local Warehouse: Repository (L)Remote repository: Remotes Repository (R)Second, commonly used commands:1. InitializationGit init2. Common configuration information(If you do not use--global, only the configuration information for the current project is set)To set up a proxy:git config--global http.p
Git common commands (some tips) install gitJava code sudoapt-getinstallgit initialize gitJava code gitinit view file changes in the current directory Java code gitstatus tracking modify file Java code gitadd file name e. ggit... common git
times to cancel the request, remember to revert in the reverse order, starting from the last time.
4. The final solution to the conflict requires re-submission of code, because the previous revert has multiple commit times, and you can use git to merge them into one commit and submit them once.
Git rebase-I head ~ X (X is an integer that combines the previous steps. Check the log for confirmation)
Follow t
Double slash after explanation for commandGit init//can make the current folder into a git repositorygit add git commit-m "xxx"//Once staging area all the changes to the branch. -M followed by the instructions for this submissiongit status//view current warehouse status, whether files have been modified, etc.git diff git log//show commit log from nearest to farth
Create a git project warehouse $git Init configures the personal registration information so that when team collaboration, you can see which user modified which Files $git config--global user.name ' cfanbo ' $git config--global user . email "[Email protected]" If there are temporary files, it is not necessary to submit
added=================================== Common Commands ==================================git add filename ...//Add File to Staging areagit rm filename ...//delete files from Staging areagit commit [filename]//Submit Staging Area file contents to local librarygit clone URL ...//Clone remote Librarygit remote add URL ...//Add a distant library on a library baseg
filename to add the specified file)Step 2:git commit-a-M "submitter" submits the project to the local warehouseStep 3:git Remote Add Origin https://github.com/xxx/xxx.git to the remote repositoryStep 4:git push Origin master to submit a local project to GitHub, you need to enter your username and passwordExampleThe process of using
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:
[email protected]
and provide relevant evidence. A staff member will contact you within 5 working days.