command can directly submit all the modifications, eliminating the need for git add, git diff, and git commit operations.
Note: you cannot add new files or folders. Therefore, if you add new files or folders, you must honestly Add. Git first, and then git commit.
Local code merge to Dev branchSubmit in local branchgit Add.Git commit-m "Playbuy"Switch to Dev Branchgit checkout DevGit pullMerging branchesGit merge local (dev merge to the HF branch, the need to add-noff parameters, is to prevent first to merge the policy, do not need the next step
git to create a branch
first get a clean copy of the code, such as
$ git clone
View the current code's branching status
$ git Branch
* Master
Where the * number indicates the branch
Git branch management and Git branch managementGit branch management overview
Almost every version control system supports branches in some form. Using a branch means you can separate it from the Development Main Line and continue
to the last commit object. It will automatically move forward in each commit operation.
The master branch of Git is not a special branch. It is no different from the other branches at all. Almost every warehouse has a master branch because the git init command c
.
With git checkout test, we can switch to the test branch.
#git checkout testSwitched to branch 'test'#git branch master*test
Through the git checkout-B xx command, we can
Tag: File mat sed repos. NET git diff stat file objectsSee what branch are currently available[emailprotected] xmrobotium$ git branch* masterCreate a new branch xm2.x[emailprotected] xmrobotium$ git
Branch (branches) refers to the development of the main line of separation, do further development without affecting the original main line.Git does not store a series of change sets (changeset), but rather a series of snapshots. When you perform a commit, Git stores a Commit object that contains a pointer to a snapshot of what you currently need to commit.The function of the master
Git view local and create branches and upload branch to serverHere is the command operation in the GIT command line, plus the instructions:Welcome to Git (version1.9. 5-preview20141217) Run' g
The basic principles of git are described in the previous two-disk article, which is theoretical knowledge. In this article we go back to practice and look at the use of Git branching (branch).In the Code versioning tool, there is a branch concept. When we started building the repository, we had only one main
Common git commands
First, create a branch: Branchname represents the new branch name, otherbranchname remote branch name
1. Create a new branch based on the current
The previous article introduced Git's local basic operations, if you don't need to collaborate with others, such as writing a book yourself, writing a small program yourself, writing a website, and so on, it's almost enough. but sharing and collaboration is the theme of the free world, and Git is born for it, so try to be a student who loves to share and collaborate. ^_^The
Git allows you to view local branches, create branches, upload branches, submit code to branches, and delete branches.Git to view local and create branches and upload branches to the server
The command operations in the git comman
Log on to GitHub and then, in the upper right corner, find the "Create a new Repo" button to create a new warehouse:
(citation: Liaoche's official website)
In the repository name fill in the Learngit, the other remains the default settings, click the "Create Repository" button, the successful creation of a new Git repo
First, git new branch, upload code to the new branch I want to achieve the effect, that is, a parallel branch of multiple content, the main purpose is to facilitate the unified management of the same content of different projects, non-interference. : As long as I have a webpack_test project on GitHub, I'm building new
Create a remote git repository within the LAN and push the local warehouse push to the remote repository
1. telnet to the server in the LAN first
2. switch to a folder in the server,
Then create a new folder to use as a git repository (the folder name is best with the same
Git operations-branch management (2), git operation branch managementResolve Conflicts
Scenario: Create a new branch feature1 and then add it to the readme.txt file.4 create a
will contain a pointer to the last commit object (the parent object in the image below). After two commits, the warehouse history will look like Figure 3-2:
Figure 3-2. Link relationships between multiple commit objects
Now let's talk about branching. A branch in Git is essentially a mutable pointer to a commit object. Git uses master as the default name for th
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.