1. First add the url of the master database to the local machine,
Git remote add
2. Obtain the modification record of the master database
Git fetch -- get modifications on the server
Git merge -- merge to merge the master database to its own branch
Git pull -- get changes a
Create a branchGit branch Create and switch to a new branchGit checkout-b Switch branchesgit checkout Merging branchesgit merge Merge is a merge of two branches, if you want to merge b_branch into the A_branch,The actual operation is to switch to A_branch first and then execute merge on A_branch.git checkout git merge
InThe home directory is generally c: \ Users \ administrator, or you can create a system username Directory, which is in c: \ Users. Create the. Git-credentials file. UseGit bashEnter the following command line to create Touch. Git-Credentials After creation, For GitH
Create and transfer to new branch: Git checkout–b xx (where XX stands for Branch name)Post a new branch on GitHub: Git push Origin Branch1Add files to the branch:
Today we continue our git tutorial, the Git Killer feature is for branch management, so today it's about the merge operation between branches. Merge can be said to be one of our most frequently used operations, and a merge operation typically contains commit, pull, push, and so on. Used to use the SVN's friends may feel git
Today we continue our git tutorial, the Git Killer feature is for branch management, so today it's about the merge operation between branches. Merge can be said to be one of our most frequently used operations, and a merge operation typically contains commit, pull, push, and so on. Used to use the SVN's friends may feel git
GIT supports a wide variety of workflows, which we typically use to create a master branch remotely, create a functional branch for each person, and work through the following routines:Go to your own branch of work$
Recent server migration, and the original local development is to switch between different branches in the same directory, feel a bit frustrated, so you want a file directory to a branch, so there is not too much file differences.
This operation is recorded and may be used later.
This is generally the case with git initialization.
Git init
Learn the notes from the Liaoche Teacher's git tutorial to review them later. ★★★★★ Create, merge, and delete branches. ★ Create Branch git branch branchname--------Create a
Git merge is used to merge branches and merge the contents of other branches into the current branch. For example, the branch structure is as follows:
master /C0 ---- C1 ---- C2 ---- C4 \ C3 ---- C5 \ issu
git reset [commit hash]However, this only allows the local branch to be rolled back to the commit, and the remote branch is in its original place.You can do this: create a new branch on the commit you want to roll back, then git c
For example, if your colleague adds branch xxx to GIT's remote branch, but you find that you are viewing the presence of branch in Android studio, and you don't see his added branch, if you look at branch, poke this: How Android Studio View
Master is the main branch of the project, points to the project version, head is the latest version of the main branch of the project, pointing to the main line namegit checkout-b Dev//Create the Dev branch and switch to the branch, equivalent to:Git
After you create a new branch, commit, or switch back to the master branch again Commit;git cannot be quickly merged at this time.Can git status find conflicting files Readme.txt, view and modify, and then submit again1. Create ne
Transferred from: http://www.barretlee.com/blog/2014/04/30/switch-branch-in-git/
Remote repository git clone down and when you execute GIT branch, you'll only see* masterDo not see other branches, even if there are other branches on the remote repository, use thegit
If you want to fetch a branch on GitHub to the local machine, directly enter the following command:
Git checkout origin/
Result error:
Error: pathspec 'origin/feature_renrendai_tongji 'did not match any file (s) known to git.
See http://stackoverflow.com/questions/5989592/git-cannot-checkout-
1, from the Remote Repository clone project to the local, in addition to create a current remote head pointer to the branch, but also copy the remote Repository branch to the local, can be through git branch-a or git
The following error occurred while creating the remote branch:
$ git checkout-b dev origin/dev
fatal:cannot update paths and switch to branch ' Dev ' at the same time.
Did you intend to checkout ' origin/dev ' which can isn't be resolved as commit?
Internet search a lot of information can not solve, finally to the StackOverflow found the answer: link
Translat
Git is really a magic tool. Today it took an hour to solve the problem of synchronization of this branch, and it has also improved a lot in understanding of the branch.
"Git GC" is a good command, which can be optimized and run without any problems.
The error message is as follows:
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.