workspace (if the
* Include path
Overwrites the workspace file with a registers file, otherwise overwriting the registers and workspace files with the files in the specified commit.
* Do not use path
Detach the head pointer state, the commit in the detached head pointer state cannot be associated with the reference, and may be lost. The main function is to switch to the branch, if omitted branch equ
There are two methods.
1. Git pull: Get the latest code locally and automatically merge it to the current branch.
Command display
// Query the current remote version $ git remote-V // pull and merge the latest code $ git pull origin master [Example 1: pull the remote origin/Master
Since SVN was used all the time before and git was used in the wolf factory. Brother's Development Environment: intellij
Let's talk about the simple operation process.
1. Check out the GIT code library
CD to the specified directory
Git clone http: //.../Android. Git
Clone remote code to
Create a branch Git branchThere are no parameters to display all local branch names in the local repository.The current checkout branch is preceded by an asterisk.
Git usage (new branch), gitbranch
Create new branch and view all branch (kk code is based on existing branch)
Switch to branch kk:
Of course, we can also operate in android studio:
First, the basic action
The branch in Git is actually just a checksum containing the object (40 character length SHA-1 string)
files, so creating and destroying a branch becomes very inexpensive.
How does Git know what branch you are currently working on? In fact, the ans
The introduction of git is not much said. Here is just a simple entry-level operation.How to install, initialize, and perform simple operations and branch operations.Everything is simple, not reasonable, but simple operations.Original article, if reproduced, please indicate the source: http://blog.csdn.net/yihui823/article/details/6673804I. Preparation 1. Installation
Under Ubuntu:
Sudo apt-Get install
. such as: release-1.2 feature Branches
May branch off from:
develop
must merge back to:
Develop
Each feature development is based on the develop pull a new branch name can be: Dbg_username_featurename
git checkout-b dbg_gyf_myfeature Develop
After the feature development is complete, if you decide to release it in the next release, merge back to develop
$
What is the use of branching in practice?You create a branch that belongs to you, others can't see it, others continue to work on the original branch, and you're working on your own branch, and you want to submit it, and then merge it into the original branch once the develo
are not familiar with git, skip the example section.
I. Master Branch
First, the code library should have one and only one master branch. All official versions provided to users are published on this main branch.
The name of the GIT main
how to usegit client using sourcetree (install a little, install mercurial client is ignored ),/http/ www.sourcetreeapp.com/download/1. Use Git's own GIT Branch branch management command:650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/59/5A/wKiom1TQeLXxpkLXAARTnQCVH14065.jpg "title=" 15.png "alt=" Wkiom1tqelxxpklxaartnqcvh14065.jpg "/>To
the location of the local warehouse, according to personal custom, such as the selection of the project source code the same directory
Click OK to create the local repository, note that this is only local. Add the project source to the local repository below.
The following
The Master branch in Gitlab is set to protected, and for developer members it is necessary to pull a separate branch for development until the stability is later merge into the Master branch. But how do we develop locally based on the developer branch, and how do we pull the developer
task, created a branch and developed it on the branch
Building a branch is also a common operation, such as temporarily modifying bugs, developing uncertain whether to join the function, etc., you can create a branch, and then wait for the right time to merge into the backb
View local branches
Git Branch * Dev master
* Indicates that the current Dev branch is located.
View remote branches
Git Branch -- remote origin/dev origin/Master
View All remote and
Gitlab The Master branch is set to protected, the members of the developer identity need to pull a branch separately to develop it, until the stability is later merge into the Master branch, But at this time how do we develop locally according to the developer branch, and how pull developer branches locally, in the pus
only master and develop.Iv. Functional BranchesNext, look at these three kinds of "temporary branches".The first is the functional branch, which is designed to develop a particular function that is separated from the develop branch. After the development is completed, it is to be merged into develop.The name of the function branch can be named in the form of fea
only master and develop.Iv. Functional BranchesNext, look at these three kinds of "temporary branches".The first is the functional branch, which is designed to develop a particular function that is separated from the develop branch. After the development is completed, it is to be merged into develop.The name of the function branch can be named in the form of fea
Git version control tool (2) ---- common operations on local version libraries, git ----
[Statement]
Reprinted, but keep the original source of the article → _ →
Life One: http://www.cnblogs.com/smyhvae/
Source: http://www.cnblogs.com/smyhvae/p/3994704.html
Contact: smyhvae@163.com
[Body]
In the previous chapter, we learned the most basic usage of
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.