There are 2 commands in git that get the latest version from the remote branch to the Local:
git fetch: The equivalent of getting the latest version from remote to local, not automatically merge
Git fetch origin master
' origin/master '. Nothing to commit, working dire Ctory CleanGo to the file directory, look at the current git state, here you can see the hint on branch master, indicating that the master branch, the next line of the hint is that your branch and Origin/master are synchronized, here origin is the name of the
pull why it works right from the start. Of course, you can set as many other tracking branches as you want, such as other branches that are not in the same way origin master . Just now we have seen an example of this: git checkout -b [分支名] [远程名]/[分支名] . If you have 1.6.2 or more versions of Git, you can also use --tra
1. Create local branch Local_branch
Git branch Local_branch
2. Create local branch Local_branch and switch to Local_branch branch
Git checkout-b local_branch
3. Switch to Branch Local
article) This example of our today Rsscan1-master this project, Copy the address Https://github.com/lsyz0021/RSScan1.git.I'm going to show you how to do this with a lot of work.First, download the projectSecond, modify the codeThird, open the Code version management function IV. Commit Codev. New BRANCHVI. Push codeVII. Managing Branch code on GitHubviii. Deleting a branchix. Remove the
Tags: Android blog HTTP Io OS AR for SP File
Most of the online solutions are under the command line. I use egit, so I need to add the following sentence to the configuration file in eclipse (my version is Kepler.
Window-> preference-> Team-> Git-> Configuration-> repository settings-> select your repository and click Open
[Branch "master"]Remote = OriginMe
About the remote branch-My understanding: The remote branch is always the latest version of the store.If the remote branch has been modified by someone else and its version is higher than the local version, you need to
set up, you can let Git get help us:In. Gitconfig [branch "Newcard"] segment (add it Yourself):remote = limingmerge = refs/heads/masterThis way, you can use git pull to get remote code after each
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 branch, Branchname
fetch-p
Renaming remote Branches
Renaming a remote branch in git means deleting the remote branch first, renaming the local branch, and then submitting a
When clone finishes the repository and switches to the development branch, a hint appears after using Git pull-r to pull and merge branches:$ git pull-rFrom Ssh://192.168.1.226:29418/ethank-serverBc86d14. B72fc88 Dev-and Origin/de
1, create a new branch from an existing branch (such as from the Master branch), create a dev branchgit checkout-b Dev2, can be viewed once created, branch has switched to DevGit branch* DevMaster3, submit the branch to the
Master Branch and Dev branch already on GitHubOn a localgit checkout-b dev new and switch to local dev branchGit pull Origin dev local branch associated with remote branch===========================================================
pull locally to create a local B1 branch;
I deleted the origin/b1 remote branch;
Other people do fetch or pull again does not delete this their local b1 branch, run git
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
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 ho
Generally we publish a new version to the online server will be a tag in the repository, so we can always view the tag version, that is, the tag is actually a snapshot in the repository. A git tag is similar to a branch, except that the branch is mutable and the label is immutable. Next we show you how to get the version that a tag in the
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.