GIT _ server and local environment build, git server build
Install the git package in linux
The git version automatically installed on many yum sources is 1.7, Which is manually compiled and re-installed here.1: Install the dependency packageYum install curl-devel expat-deve
follows:
# # Parses out of the branch name from. Git/head:
Find_git_branch () {
Local dir=. Head
Until ["$dir"-ef/]; Todo
If [f "$dir/.git/head"]; Then
Head=$ (if [[$head = Ref:\ refs/heads/*]]; Then
Git_branch= "→${head#*/*/}"
elif [[$head!= ']]; Then
Git_branch= "→ (detached)"
Else
Git_branch= "→ (unk
1. The remote branch is generated when the local branch is pushed to the server. For example, the master node is the most typical remote Branch (default ).
1
$: git push origin master
Apart from the master, we can also create branches and push them to the se
, check out the Branch she said to the local device for testing.
$ git remote add jessica git://github.com/jessica/myproject.git$ git fetch jessica$ git checkout -b rubyclient jessica/ruby-client
If she sent an email again soon,
Rebase the local current code and the master branch of the remote code, where origin is the local alias of the remote repository
Git push Origin Master:master
Push the changes to the remote repository, as described in the following command, which means: Push the
time. After registration, try to add a new file to test whether git works well. The result is "Every up-to-date" displayed during the push operation. when checking the file, it is found that none of the files are actually updated. Because I am not familiar with git, I Have To Googling.
After searching, find the cause as follows:
Why does git refuse to p
funds, the new function must be canceled!In vain, however, this branch must be destroyed in situ:$ git branch -d feature-vulcanerror: The branch ‘feature-vulcan‘ is not fully merged.If you are sure you want to delete it, run ‘git branch
-merging readme.md
CONFLICT (content): Merge CONFLICT in readme.md
Automatic merge failed; fix conflicts and T Hen commit the result.
Look at the current status and look for help information:
Jacarri@jacarri-pc/f/temp/mvn/jacarrichan (master| Merging)
$ git Status
# on branch Master
# you have unmerged paths.
# (fix conflicts and run "git Commit")
#
# unm
Branching is a powerful tool for code management. If there is no effective branch management. Code management can not adapt to complex development processes andThe needs of the project.Overview of BRANCH Commands:Branch management in git uses the command git branch. The main
In the beginning, I did not add the. Classpath in the GIT project to the. Gitignore, causing the file to persist in the remote branch so that when executing git pull on another machine, the local. Classpath is corrupted and the reference to the project is problematic. Thus, we need to
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
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
The GIT branching structure is just the tree and then merging.1. Switching of branches and Merging Git checkout-b new-branch-name: You can quickly build and switch to a new branch.git checkout branch-name: You can quickly switch to a branch.Git branch: You can show all of t
| Introduction If you are using GIT with the command line, you can use the git status command to query which branch you are working on now, but it's hard to forget what branch you're under, so you have a mug with a wrong operation. It is no doubt convenient to display 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
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 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$ git checkout workJob....Commit changes to the work
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.