branch

Git commit against tag with no branch

微笑、不失礼 提交于 2019-12-03 01:02:19
问题 If I check out a tagged version of my source code without creating a branch, Git indicates that I'm not associated with any branch at all. It's happy to let me make changes and check them in though. Where do those changes go? If I switch back to 'master' they disappear (overwritten by what was in master) and I can't seem to find them again. What gives? If Git lets me commit changes against what's essentially an anonymous branch, surely I can get them back? 回答1: Because your commit isn't on

Git rebase conflicts after successful merge?

匿名 (未验证) 提交于 2019-12-03 01:00:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have two branches: let's call them master and feature . I'm now trying to merge recent changes from master into feature. I normally prefer rebases over merges, but these two branches have diverged significantly, so I decided to do a merge instead to have a record of all the conflict resolution. I finished up the merge, and committed it on feature, and thought I was done. Everything looked good. Now, I made a small change to master and wanted to just rebase that into feature, but git rebase master now gives me conflicts with older commits

Git: failed to read object … Invalid argument

匿名 (未验证) 提交于 2019-12-03 00:59:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I had this git message after a forced VM shutdown, which obviously corrupted the git index Git: Failed to read object abcdef.... Invalid argument I looked at these existing answers Restore a corrupted index Recover damaged git by HD failure None seemed to work. 回答1: Using @Arindam's answer above didn't work for me, but a variation of it did, I hope someone else finds it useful: At this point you're in GIT limbo. You can't checkout a new branch with the state of the current branch, likely because the reflog is corrupted. Before you continue:

branch out of range compile error

匿名 (未验证) 提交于 2019-12-03 00:59:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I get the following compile errors when compiling to the device. (When compiling to simulator everything is OK) /var/folders/3B/3BAjD+ANHHmfh-eIWrtXDU+++TI/-Tmp-/cc-hojnUD.s:1784380:branch out of range /var/folders/3B/3BAjD+ANHHmfh-eIWrtXDU+++TI/-Tmp-/cc-hojnUD.s:1784372:branch out of range /var/folders/3B/3BAjD+ANHHmfh-eIWrtXDU+++TI/-Tmp-/cc-hojnUD.s:1784364:branch out of range /var/folders/3B/3BAjD+ANHHmfh-eIWrtXDU+++TI/-Tmp-/cc-hojnUD.s:1784356:branch out of range In various places I read something about turning off "Thumb". I don't

Jenkins Pipeline conditional stage succeeds but Jenkins shows build as failed

匿名 (未验证) 提交于 2019-12-03 00:59:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Jenkins version = 2.19 Jenkins Multibranch Pipeline plugin version = 2.92 I have a Jenkinsfile with a few conditional stages based on the branch. Here is a modified for the sake of brevity version of my Jenkinsfile: node { stage('Checkout') { checkout scm } stage('Clean Verify') { sh 'mvn clean verify' } if (env.BRANCH_NAME == "develop") { stage('Docker') { sh 'mvn docker:build -DpushImage' } } } I am using the multibranch pipeline plugin. It successfully detects and builds all my branches. The problem I have is that all builds report as

Git delete branch without cloning?

匿名 (未验证) 提交于 2019-12-03 00:57:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Is there a way to delete a branch from a Git repository without doing a clone or any other sort of local copy? Basically I'm working on a dashboard for a release pipeline and don't want to have to have any of the working project's code on the dashboards server just to delete deployed feature branches. In case it matters, we use Atlassian Stash and not Github. I'm looking to do something similar to: git branch -D ssh://git@repository.com/team/project/feature/deleteme 回答1: Easy, from any git repo git push u://r/l +:refs/heads/branchname and if

How to use rolling update to re-pull container image?

匿名 (未验证) 提交于 2019-12-03 00:57:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a kubernetes RC/pod consisting of containers with images like: foobar/my-image:[branch]-latest where "branch" is the git branch ("master", etc). What's the best way to use rolling-update to force the RC to re-pull the images to get the latest version? The brute force method is to simply delete the RC and re-create it, but that causes downtime for the service. Is rolling update only possible if you specify an exact image tag, rather than something like "latest"? 回答1: You should be able to use a rolling update specifying the same image

Branch/change not merged, though Gerrit claims, it is

匿名 (未验证) 提交于 2019-12-03 00:57:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Each time, I see merged status on my change in Gerrit and I do git pull origin , I can clearly see, that my change/branch hasn't actually been merged into master. Please, review my Gerrit's workflow and tell me, what I'm doing wrong or what am I missing: Create & checkout branch locally. git checkout -b 77-blah Do the magic and comment all changes. git commit -am "changes to 77-blah" Create the same branch using UI and setting its revision to HEAD (this should be automated soon ). Push changes (that particular branch) to Gerrit,

git and local modifications

匿名 (未验证) 提交于 2019-12-03 00:57:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am discovering how to use git. I just made the following test: create a folder and 2 files then git init, git add ., git commit -m "initial commit" create a branch: git branch experimental, git checkout experimental then change the name of the folder and delete one of the files, then git add ., git commit -m "experimental" go back to master: git checkout master Surprise: I do not find the master as I left it; the folder has disappeared. And I have to do a git -reset --hard to find my folder. I wonder if I did something wrong or if I have

git and local modifications

匿名 (未验证) 提交于 2019-12-03 00:56:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am discovering how to use git. I just made the following test: create a folder and 2 files then git init, git add ., git commit -m "initial commit" create a branch: git branch experimental, git checkout experimental then change the name of the folder and delete one of the files, then git add ., git commit -m "experimental" go back to master: git checkout master Surprise: I do not find the master as I left it; the folder has disappeared. And I have to do a git -reset --hard to find my folder. I wonder if I did something wrong or if I have