names it locally as origin/master. Git will also give you a local master branch that points to the same place as the master branch of origin, so you have the basis for the job.
Remote Repository The name "origin", like the branch name "master", does not have any special meaning in Git. At the same time "master" is the git init default starting branch name wh
operations in Git require only access to local files and resources, without networking. But if you use CVCs, almost all operations need to connect to the network. Because Git keeps a historical update of all current projects on the local disk, it is fast to handle.
For example, if you want to browse the history update summary of a project, Git does not have to
Diffstat of changes introduced at each commit. Also used to look at the relative information of the change,--stat is simpler than the output of-P. 4. Update index, commit code1) Update index
git Add. The code is added to the staging area2) Submit Code
Submit the changes that have been added. Git commit-m "The commit message" Git commit-a will first add a
give a past commit to hit Tag:git tag-a v0.9 XXXX Push when it is not included, if you want to include, you can add--tags parameters when push. When fetch, branch head can reach the tags are automatically fetch down, tags that aren ' t reachable from branch heads would be skipped. If you want to make sure that all tags are Included, you need to add the--tags option.git remoteList, add and delete remote rep
Git's first use Git common command query Git push Git pull before introducing installation and simple use, let's take a look at The introduction in Baidu Encyclopedia: ---------------------------------- Git --- The stupid content tracker, dummies content tracker. In Linux, we will introduce
this: Before you can enter a character, such as X
X//After pressing: And then pressing X to save the current changes save the changes to complete the conflict
VI//vi and the modified file name means that you want to modify the file, such as deleting a file conflict
Ctrl+r Redo the previous undo operation
Resolve Conflicts
git reset--hard HEAD//revert to the state of the commit that was last committed to the current branch
-ls-filesSee which files are in the current git library.3.11. Git MVRename a file, directory, or link.For example: Git mv helloworld.c helloworld1.c (Rename the file helloworld.c to helloworld1.c)3.12. Git Branch3.12.1. General statementThe cost of creating a branch in the Git
it.
In short, is in git, branch can completely in the local hide to play, whether to push, depending on your mood!Multi-person collaborationreads: 178355When you clone from a remote repository, actually git automatically corresponds to the local master branch and the remote Master Branch, and the default name of the remote Repository is origin.To view information for a remote library, use
remote repository update and merge to local
Git pull--no-ff # Crawl all branches of remote repository update and merge to local, do not fast-forward merge
Git fetch origin # crawl Remote repository update
git merge Origin/master # merges the remote main branch into the local current branch
into your current version, and you can do this:
git remote add code_a git://url/test.git//Add each other's address, Code_a is an alias
git fetch code_a//Copy each other's repository to local, but not merge, Git pull will automatically merge
Found in accordance with the git push stuck to Google, can search a lot of previous peer sent blog has mentioned, but seemingly no solution. This problem has been solved in the latest version of Msysgit, hoping the solution will spread out. Let more programs ape classmates see.=====================Ah ah ah, studied for two days, finally found solution. Go to the shouts for a while=====================The project team used the server to hang up, hard d
current version, you can do this:
git remote add code_a git://url/test.git//Add each other's address, Code_a is alias
git fetch code_a//Copy each other's warehouse to the local, but not merge, Git pull will automatically merge
git
remote repository update and merge to local
Git pull--no-ff # Crawl all branches of remote repository update and merge to local, do not fast-forward merge
Git fetch origin # crawl Remote repository update
git merge Origin/master # merges the remote main branch into the local current branch
managementC code
Git pull # Crawl all branches of remote repository update and merge to local
Git pull--no-ff # Crawl all branches of remote repository update and merge to local, do not fast-forward merge
Git fetch origin # crawl Remote repository update
git merge
# Delete Staging area
git remote branch managementC code
Git pull # Crawl all branches of remote repository update and merge to local
Git pull--no-ff # Crawl all branches of remote repository update and merge to local, do not fast-forward merge
Git fetch origin
branch is merged??????????????????? A very important chapter--The end??????????????????? -------Multi-person collaboration-------1. When you clone from a remote branch using Git clone, the local master branch and the remote Master branch are automatically mapped, and the remote repository defaultName defaults to Origin View Remote Library branch git remote or more information about
Git is by far the most popular version management system, and learning git is almost a necessary skill for developers.One of the advantages of git is that it's very easy to operate remotely. This article details 5 git commands, their concepts and usage, and you'll get a complete grasp of
origin is automatically created, you can use the GIT remote-V name to view detailed information about the remote database.
$ Git remote-V
In practice, we may need to frequently interact with one or more remote databases. A better way is to use an alias to save the remote database. The method for adding a remote repository in git is simple:
# $
One of the advantages of git is that it's very easy to operate remotely. This article details 5 git commands, their concepts and usage, and you'll get a complete grasp of git remote operations.
§git Clone
§git Remote
§gi
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.