branch

git submodule foreach checkout supermodule branch

匿名 (未验证) 提交于 2019-12-03 01:54:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Consider a git repository Foo/, which has submodules bar1/ and bar2/. Each of these has the same branches: 1 & 2. I enter the supermodule, and I want to update the supermodule to contain the most recent commits from bar1 and bar2's origin. I've already init'd and updated the supermodule, so there's working trees in bar1 and bar2, but they are in a detached state. I can do the following: cd foo ; git checkout 1 git submodule foreach git checkout 1 git pull Now, what bugs me is repeating the branch identifier. Can I do something like

git-svn: Cannot setup tracking information; starting point is not a branch

匿名 (未验证) 提交于 2019-12-03 01:52:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: In git 1.7.9.5 I could run the following lines without error: export SVNPASS=readonly git clone git@github.com:dtenenbaum/RGalaxy.test.git cd RGalaxy.test/ git config --add svn-remote.hedgehog.url https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/RGalaxy git config --add svn-remote.hedgehog.fetch :refs/remotes/hedgehog # the following is a shortcut to avoid fetching every commit since antiquity, since I happen to know the commit number # where this folder was added to svn: echo $SVNPASS | git svn fetch --username readonly hedgehog

Show the original branch for a commit

匿名 (未验证) 提交于 2019-12-03 01:52:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've used git-blame to find a particular commit. Now I want to find the branch that it originally came from. (From there, I'll use the branch name to find the particular ticket) Let's define "original branch" as "the branch to which the commit was made before the branch was merged into any other branch". 回答1: Like the others said, if the branch you are looking for isn't local to the repository on which you are blaming this commit (e.g. a branch only in the personal repo of a distant developer), you are screwed. But assuming that sought-after

Git: refname 'master' is ambiguous

匿名 (未验证) 提交于 2019-12-03 01:52:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've looked at all of the other ambiguous refname questions and none of them seem to help. Why am I getting this warning? $ git checkout master warning: refname 'master' is ambiguous. $ git show-ref master eef61c00da690f093063ac5a728e22fd21648104 refs/heads/master $ git branch -a checkers exercises * master $ git remote -v $ 回答1: TL;DR: save and delete the tag, as Ashutosh Jindal comments (see " Rename a tag in git? "): git tag tag-master master git tag -d master Original answer: Most of the sources I see (like this FAQ ) point to the same

fatal: bad default revision 'HEAD'

匿名 (未验证) 提交于 2019-12-03 01:52:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm using GIT as my source control system. We have it installed on one of our Linux boxes. Tortoise GIT is my windows client. This morning I checked in some changes, and tagged the code. I then did a push of my local repository to the remote repository. When I go to my repository on the unix box and type in git log I get: fatal: bad default revision 'HEAD' But when I do a show log using my windows tortoiseGit client the history comes up nicely as per below... --- SHA-1: f879573ba3d8e62089b8c673257c928779f71692 Initial drop of code --- master

Svn switch from trunk to branch

一个人想着一个人 提交于 2019-12-03 01:50:33
问题 I am in the root folder of an SVN-hosted project's trunk and am exploring setting up two branches. One branch will be a "snapshot" of the project at the current (stable) revision, and a second branch will be one I'll work on to apply some new code, test, and then upgrade the trunk to a new version. My goal is to keep the snapshot as insurance and a quick way to get an older, stable version of our project. The second branch, once we apply fresh code and the tests pass, will be merged back into

Jenkins Git plugin detached HEAD

匿名 (未验证) 提交于 2019-12-03 01:49:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am new to Git and also to Jenkins. My problem is that I can't get the Jenkins Maven release plugin to work. When I build a common Maven build with Jenkins, it works well, but when I try to perform a release with the Maven release plugin, I get the following stack trace: org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.3.2:prepare (default-cli) on project parent: An error is occurred in the checkin process: Exception while executing SCM command. at org.apache

git push fails: `refusing to update checked out branch: refs/heads/master`

匿名 (未验证) 提交于 2019-12-03 01:49:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to store my local modifications to JBoss config in git. For this, I have set up the following structure: lrwxrwxrwx 1 jboss jboss 19 Jan 24 11:53 current -> jboss-as-7.1.0.CR1b drwxr-xr-x 11 jboss jboss 4096 Jan 24 12:13 jboss-as-7.1.0.CR1b -rw-r--r-- 1 jboss jboss 108211143 Jan 23 16:02 jboss-as-7.1.0.CR1b.tar.gz drwxr-xr-x 6 jboss jboss 4096 Jan 24 11:36 local local is the git repository which shall be the "origin". The idea is that I want to be able to easily update my JBoss distribution once an update is available. I want to store

How to I “move” my commits from “no branch” to an actual branch?

匿名 (未验证) 提交于 2019-12-03 01:49:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I made a mistake, and started making commits "to the last tag", which lands my commits in "no branch". They should have been applied at the head of an already existing branch. I have not pushed my changes yet. I've found a few other question for when commits are in the wrong branch, but now I have no branch, so I don't know how to handle this. Preferably, I would like to erase my mistake entirely, and "move" my changes to the end of the right branch. If I must leave my mistake in the history, I need to merge them in atleast. 回答1: You are

git-svn: reset tracking for master

匿名 (未验证) 提交于 2019-12-03 01:49:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm using git-svn to work with an SVN repository. My working copies have been created using git svn clone -s http://foo.bar/myproject so that my working copy follows the default directory scheme for SVN (trunk, tags, branches). Recently I've been working on a branch which was created using git-svn branch myremotebranch and checked-out using git checkout --track -b mybranch myremotebranch . I needed to work from multiple locations, so from the branch I git-svn dcommit -ed files to the SVN repository quite regularly. After finishing