Remote Branch (branch) is the index of a branch in a remote repository. They are local branches that cannot be moved, and are only updated when Git is interacting with the network. The remote branch is like a bookmark that reminds
information metadata that points to the tree object (root directory):
Make some changes and commit again, this time the commit object will contain a pointer to the last commit object (that is, the parent object in). After two commits, the warehouse history will look like this:
A branch in Git is essentially a mutable pointer to a commit object . Git
BKJIA Editor's note: This is the third article translated by the translator LIU Hui on the series of articles "Git Community Book". This article uses the "ding Jie niu" method to introduce how to add a project to version management. If you are not clear about how to download, install, and configure Git, refer to the Git adventures (2): install and configure
You can use git for version management. How can you add a local project to the git version library and use the git command or sourcetree tool for version management?First, open sourcetree and click "command line mode ". This operation is more convenient in command line mode.Take the windows environment as an
checkout-B releases-1.2 DevelopSwitched to a new branch "release-1.2"$./Bump-version.sh 1.2Files modified successfully. Version bumped to 1.2.$ Git commit-a-m "bumped version number to 1.2"[Release-1.2 74d9424] bumped version number to 1.21 files changed. 1 insertions (+). 1 deletions (-)
After you create a new branch
1. Create a warehouse named Git-repositionmkdir home/sunjf/git-repositionNote: HOME/SUNJF can be specified as the path you want below2. Initialize the WarehouseCD ~/git-reposition//Enter the warehouse directoryGIT init//Initialize RepositoryAt this point, the. git file will
InstallationSince I'm using Ubuntu, it's easy to install, input:sudo apt-get install gitIf it is a different Linux version, you can install it directly from the source. First download the source code from the GIT official website, then unzip ./config , make then sudo make install Enter:, these several commands to install just fine.As for Mac and Windows install git, in Liaoche's official website has the d
Git Branch Management
Almost every version control system supports branching in some form. Using a branch means that you can detach from the development thread and continue to work without affecting the mainline.
Some people call Git's branching model A "must-kill" feature, and it's because of it, it separates git fr
This article commands:
The configuration display color is: git config--global color.ui true
to set aliases to commands: Git config--global alias.co checkout
View remote repositories: Git remote-v To
create a remote warehouse branch:
commit object, which automatically moves forward each time it commits. Before we mentioned a pointer called Head, which represents the version of your current commit, this head is exactly a pointer to the local branch you are working on.Management of 3.Git BranchesGit wants to create a new
. Remote:total3(Delta1), reused3(Delta1), pack-reused0Unpacking objects: -% (3/3), Done. From Github.com:wangmingshun/Studygit* [New branch] Dev-and origin/devupdating 90bc1f7. 9565f59fast-forward Readme.txt|6++++++1 fileChanged6Insertions (+)Now that your little partner is developing on the dev branch, you have to create a origin remote dev
git creates the branch and uploads the code to the new branch
Create a branch: I'm a new branch created directly under the project on GitHub, which I'll add later;
two uploading code to a new
pointer.$ Git branch TestingQuestion3: How does git know on which branch you are currently working on?
It stores a special pointer named head. Note that it is very different from the head concept in many other version control systems you are familiar. In git, It is a pointe
In software development, bugs are like a routine, with bugs that need to be fixed, and in Git, because the branches are so powerful, each bug is repaired by a new branch, after the repair, the branch is merged, and then the temporary branch is deleted.When you receive a bug that fixes a code name of 119, it's natural t
Some mistakes may occur during git usage.
For example, execute checkout-F, reset-hard, or branch-D to delete a branch.
As a result, the local (remote) branch or some commit is lost.
At this time, we can use reflog to restore the service, provided that the lost
1, the purpose of the branch
Suppose you're writing an essay. You have written the first version and submitted a reviewer. Later, you get new data, and you're adding your data to the paper. In the process, the reviewer lets you change the format of your paper. Obviously, you cannot submit the version you are changing to them after you have modified the format. You only want to send them after the format has been modified on the basis of previous versi
Through the previous two articles in this series (see series: HTTP://WWW.CNBLOGS.COM/JEREHEDU/P/4607599.HTML#BBKZ), we already know how to use Git to do version control of the file. This time we continue to learn how to manage branching through git.First, we need to figure out what a branch is. With the git log command we can view the repository's commit log,So w
branch
Suppose such a situation:
I created the local branch B1 and pull to the remote branch origin/b1;
Others create local B1 branches locally using fetch or pull;
I removed the ORIGIN/B1 remote
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.