Tags: key git name start fun dex SYN SEL BSP1. Enter your home directory
cd~
2. Edit the. bashrc file
vi.bashrc
3. Add the following code to the last point of the file
functiongit_branch {branch="`git branch 2>/dev/null | grep "^\*" | sed -e "s/^\*\//"`
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 remote repository points
Delete remote BranchGit push Origin -- delete View local branchesGit BranchCreate a local branchGit branch View All branches (local + Remote)Git branch-Delete local branchGit Branch -- delete Switch BranchGit checkout Create a new branch based on the current
Build jenkins Plug-In Git Parameter Plug-In branch project, jenkinsgit
Jenkins Plug-In Git Parameter Plug-In Parameter construction. You can select a branch of git to build the service during the construction. The Dynamic Choice Parameter Plug-In is used In earlier jenkins
Http://zhidao.baidu.com/link?url=cuqJsL9skJJn5c556zXfP1dgCAOUK37CDXkNIw_ Ss0ykmvoroti0hp7-pbkjgs6lv4xrgleg2fjg5aangaslxgmt00c7rsc5gpprykr_d_ggit clone can clone only the master branch of the remote library and cannot clone all branches, the workaround is as follows:1. Find a clean directory, assuming it is git_work2. CD Git_work3. Git clone http://myrepo.xxx.com/project/.
This post consists of: http://xinpure.com/?p=15Bulk Delete Git branchWhen you use git , you often find that you create a large number of branches unconsciously. So, the trouble is coming, so many abandoned branches, what to do?You can't always do git branch-d branchname Delete it!Here's a way to bulk delete a branch:gi
1 Go to your home directoryCD ~2 Edit. bashrc fileVI. BASHRC3 Add the following code to the end of the filefunction git_branch { Branch= "' Git branch 2>/dev/null | grep" ^\* "| sed-e" s/^\*\//"'" if ["${bra NCH} "! =" " ];thenif [" ${branch} "=" (No branch) " ];then
1. View branches:The GIT branch command lists all branches with a * number in front of the current branch 2. Create a branch:git branch 3. Switch branches:git checkout 4. Create + switch branch: git checkout-b Now that the workspa
If you want to check the code of a previous version during development, first check the log
Git logcommit commit: Eric
Then we checkout a version
Git checkout f224a720b8192165a4e70f2564e42859964bebbb
If a problem is found, we changed it. Then we commit and push, but the server does not have the information we submitted because we are on a new branch.
View
Objectives:
Http://www.adaiw.com /? P = 611
Use a git repository to manage multiple branches and release multiple versions. The main logic of these versions is one to one, and the functional appearance is slightly different.
The command is as follows:
New a branch:
$git checkout HEAD -b newBranch
Push to remote:
$git p
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 branch (or any other storageStable code place), you can use this very unreasonable syntax to delete it: git push
The command is as follows:1: Locally created branch dev[Email protected]/d/home/myself/symfony (master) $ git branch dev2: The following is the submission of the local branch to the remote repository[Email protected]/d/home/myself/symfony (master) $ Git push origin devtotal
git deletes the default branch
Problems with removing the default branch are experiencing the following issues
Error:cannot Delete the branch ' master ' which you is Currentlyon
Error:cannot Delete Branch ' master ' checked out at
Later found that the original deletion
The GIT branch can understand that master is a master task, you can open up a branch of your own from this main task, and then you do the code work you need to do on the direct branch, and every git add git commit commits to your
Branching is the parallel universe in sci-fi movies, and while you're working on git in front of your computer, another one is working on SVN in another parallel universe.If two parallel universes don't interfere with each other, that's not going to affect you now. However, at some point in time, two parallel universes merged, and as a result, you learned both Git and svn!.What is the use of branching in pr
Git's powerful branch management functions and its offline work make it widely used in various major enterprises.
Now that there are branches, there is of course the merge problem, and the advantage that git itself can work offline also brings a headache. Since it is offline work, so developers do not need to synchronize with the server all the time, so there will be conflicts when the branches are merged t
Step one: view state git statusStep two: Add all git adds--allStep Three: Check the status of Git againFourth step: Commit git commit-m ' notes 'Fifth step: Pull the Repository code git pulls to view the status of Git statusSixth
git log View the commit history of the current branchAfter submitting a number of updates, to review the commit history, you can use the git log command to viewBy default, git log all updates are listed by time of submission, and most recent updates are on top. See, each update has a SHA-1 checksum, the author's name and e-mail address, the time of submission, an
git branch-d branchname Deleting a branch requires the following conditions:1 if the branch to be deleted does not have upstream branch, the branch to be removed needs to be merged into the head, otherwise you will need to use-D t
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.