branch

git refusing to fetch into current branch

匿名 (未验证) 提交于 2019-12-03 01:59:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I set up a remote repository and I can push new changes to it, but I cannot fetch from it, I always get the (rather cryptic) error message: fatal: Refusing to fetch into current branch refs/heads/master of non-bare repository fatal: The remote end hung up unexpectedly What does it mean? What should I do to enable fetching? (Note that this remote repo is only used as a backup repo, so it should be pretty much an exact copy of my local repository. I really can't understand why I can push to it but not fetch from it...) My config looks like:

Change root of a branch in git

南楼画角 提交于 2019-12-03 01:58:50
I'm using git and want to change the base of an exiting branch. This is caused by a deployment system, which pulls this explicit branch into my production environment. When planning my releases, I create a tag every time I want to go live. But my branch has special changes too, so git reset --hard v1.0 won't work. Here a small example. I want this C---D---E deploy / A---B---F---G master \ v1.0 to become this C---D---E deploy / A---B---F---G---H---I---J---K master \ \ v1.0 v1.1 Maybe git rebase is what I am looking for, but the man pages don't help me. Thanks for your replies! git rebase should

git refusing to fetch into current branch

匿名 (未验证) 提交于 2019-12-03 01:58:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I set up a remote repository and I can push new changes to it, but I cannot fetch from it, I always get the (rather cryptic) error message: fatal: Refusing to fetch into current branch refs/heads/master of non-bare repository fatal: The remote end hung up unexpectedly What does it mean? What should I do to enable fetching? (Note that this remote repo is only used as a backup repo, so it should be pretty much an exact copy of my local repository. I really can't understand why I can push to it but not fetch from it...) My config looks like:

fatal: The upstream branch of your current branch does not match the name of your current branch

匿名 (未验证) 提交于 2019-12-03 01:58:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: After doing a checkout of the remote branch releases/rel_5.4.1 using the Git GUI, I'm seeing this unexpected error message when I try to push : fatal: The upstream branch of your current branch does not match the name of your current branch. To push to the upstream branch on the remote, use git push origin HEAD:releases/rel_5.4.1 To push to the branch of the same name on the remote, use git push origin rel_5.4.1 I don't know what Git is talking about. I probably want to push to origin releases/rel_5.4.1 since that's the branch which I

Android Studio Update Project: Merge vs Rebase vs Branch Default

匿名 (未验证) 提交于 2019-12-03 01:58:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Apologies if this seems redundant as I know there are fair amount of questions regarding Merge vs Rebase, but there doesn't seem to be any that throw in 'Branch Default' as well. You are given a case where you have multiple people working on something (i.e. an Android app in Android Studio) concurrently. What is the best option to update project/pull if someone pushes to the master branch and you want to pull in the new master such that it doesn't overwrite the work you are still working on and have yet to commit and push to master

git push vs git push origin <branchname>

匿名 (未验证) 提交于 2019-12-03 01:58:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm quite new to git. I'm creating a branch and then want to push it to origin. I think that simple issuing git push while standing on my branch should be sufficient. Is it possible to do that (by specifying push.default simple)? Is it reasonable to do that? 回答1: The first push should be a: git push -u origin branchname That would make sure: your local branch has a remote tracking branch of the same name referring an upstream branch in your remote repo ' origin ', this is compliant with the default push policy ' simple ' Any future git push

Active Git branch is “(no branch)” on hudson CI

匿名 (未验证) 提交于 2019-12-03 01:58:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: My Ant build.xml script starts with GIT_BRANCH = ${env.GIT_BRANCH} PWD = ${env.PWD} Hudson CI is setup to build when any branch changes. Console output is... Commencing build of Revision 90906a63929e9074035eb5b10c71ee055ad3e13c (origin/DPM-48) GitAPI created Checking out Revision 90906a63929e9074035eb5b10c71ee055ad3e13c (origin/DPM-48) [workspace] $ git.exe checkout -f 90906a63929e9074035eb5b10c71ee055ad3e13c [workspace] $ cmd.exe /C '"C:\Program Files\WinAnt\bin\ant.bat" -file build.xml ...' [echo] GIT_BRANCH = ${env.GIT_BRANCH} [echo] PWD

“simple” vs “current” push.default in git for decentralized workflow

匿名 (未验证) 提交于 2019-12-03 01:58:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Functionally speaking, in a decentralized workflow, I don't see the difference between simple and current options for push.default config setting. current will push the current branch to an identically named branch on the specified remote. simple will effectively do the same thing as well for both the tracked and any untracked remotes for the current branch (it enforces identical branch names in both cases). Can someone explain any important differences between the two for decentralized workflows that I am missing? 回答1: The difference is

Remote branch not showing up in “git branch -r”

匿名 (未验证) 提交于 2019-12-03 01:58:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have been pushing to a remote bitbucket repo and recently a colleague has pushed a new branch he created to the same repo. I'm trying to fetch the changes he uploaded. $ git branch -a * master localbranch1 localbranch2 remotes/origin/master $ git branch -r origin/master In the web ui for bitbucket I can see the branch he has made. Any help/advice/direction would be most appreciated. Thanks. Any futher info you need just ask. EDIT 1 $ git fetch bitbucket Password for 'https://xxxxx@bitbucket.org': From https://bitbucket.org/user/repo *

When to use the '--no-ff' merge option in Git

匿名 (未验证) 提交于 2019-12-03 01:58:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: A Successful Git Branching Model recommends to use --no-ff when merging branches: The --no-ff flag causes the merge to always create a new commit object, even if the merge could be performed with a fast-forward. This avoids losing information about the historical existence of a feature branch and groups together all commits that together added the feature. […] Yes, it will create a few more (empty) commit objects, but the gain is much bigger that that cost. Unfortunately, I have not found a way to make --no-ff the default behavior of git