Transferred from: http://zengrong.net/post/1746.htm
This site is reproduced in addition to the article, are the original site or translation.
The article welcomes all forms of reprint, but please 18 years of age and above the reprint of the source of the article, respect for my labor, but also respect your IQ;
This site part of the original and translated articles to provide markdown format source code, welcome to use the source of the article reproduced;
This blog use wpcmd
1. View Remote BranchGit branch-rOrigin/master2. View local Branch*masterNote : The local branch where the current is located is indicated by *3. View local and remote branchesGit branch-a*masterRemotes/origin/master4. Create a br
1, in the development process, everyone in the remote creation of many branches, some are useless, how to delete, you can refer to the following methods.If you no longer need a remote branch, such as taking a feature and merging it into a remote master
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
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
submitted to the branch, and someone else can pull the file you submitted to him locally via the git pulls command.
Hint: Upload to remote server, if error fatal:the current branch test have no upstream branch. is because the submission to the
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 pull 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 --track options to simplify :$ git checkout --trac
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 repository concept can be und
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========================================================================================================
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/devThere is no tracking information for the current branch.Please specify which branch the w
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
Today delete local branch git branch-d XXX hint: The branch xxx is not fully mergedCause: The XXX branch has no content merged into the current branchWORKAROUND: Use uppercase D to force removal of
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
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
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.