branch

Select branch to build in Jenkins

匿名 (未验证) 提交于 2019-12-03 01:18:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have several branches in my project. Is it possible to make dynamic branch selection in Jenkins's job? The idea is that Jenkins will get list of current branches and display them as possible choice parameter. Is there any way to do that? Thanks 回答1: Yes, you can do that using Extended Choice Parameter plugin. Once you have installed the plugin, go to your job's configuration page. Now follow the steps mentioned below: Enable check box This build is parameterized . In the dropdown menu, Add Parameter , select Extended Choice Parameter Since

How to compare different branches on Visual studio code

匿名 (未验证) 提交于 2019-12-03 01:17:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: How to compare different branches on Visual studio code 1.9? Is it possible? 回答1: I would recommend to use: Git Lens . 回答2: UPDATE Now it's available: https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory until now it isn't supported, but can follow the thread for it: github 回答3: Use Git History Diff plugin for easy side-by-side branch diffing: https://marketplace.visualstudio.com/items?itemName=huizhou.githd Visit the link above and scroll down to the animated gif titled Diff Branch . You'll see you can easily pick any

git pull displays “fatal: Couldn't find remote ref refs/heads/xxxx” and hangs up

匿名 (未验证) 提交于 2019-12-03 01:14:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I created a branch called '6796', then I pushed it to remote, checked it out on another machine, made other edits, pushed it, then merged it with the master, and deleted it - locally and remotely ( git push :6796 ) - on the other machine. Now, when I run git pull : fatal: Couldn't find remote ref refs/heads/6796 user@host:~/path/to/repo$ fatal: The remote end hung up unexpectedly but git pull origin master works normally. It seems to me that there is some 6796 reference hang up... how to resolve this? 回答1: There are probably some commands to

git shallow clone (clone --depth) misses remote branches

匿名 (未验证) 提交于 2019-12-03 01:14:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: After cloning a remote repository it does not show any remote branch by -a option. What could be the problem? How to debug it? In this snippet two of the remote branches are not shown: $ git clone --depth 1 git://git.savannah.gnu.org/pythonwebkit.git $ cd pythonwebkit $ git branch -a * master remotes/origin/HEAD -> origin/master remotes/origin/master $ git --version git version 1.8.3.1 Tried the same command on another machine, it works well: $ git clone --depth 1 git://git.savannah.gnu.org/pythonwebkit.git Receiving objects: 100% (186886

git: merge two branches: what direction?

匿名 (未验证) 提交于 2019-12-03 01:14:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: We have the following situation: A --- B --- C --- ... --- iphone / ... --- last-working --- ... --- master Between last-working and iPhone, 32 commits were made. Between last-working and master, a lot of commits were made. What I want now is a new branch where I have iphone and current master merged together. And at some later time, this should be merged into the master. First, I planned to do: git checkout iphone -b iphone31 git merge master But then I thought, if it would be better to do: git checkout master -b iphone31 git merge iphone

Configure Jenkins to work with SVN branches

匿名 (未验证) 提交于 2019-12-03 01:14:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am currently setting up Jenkins to work with SVN repository. Currently it works fine for the trunk. Now I want to set up Jenkins to take care of newly created branches. I don't want to create a new project manually for every new branch in SVN. Is there already a solution which allowes to use SVN and to create jobs/tasks in Jenkins automatically for every brach created in SVN? How do you use Jenkins with SVN tags/branches? 回答1: Also check my extend answer if you are not very familiar with jenkins. It provides a step by step solution with

Git merge -s theirs: Simply?

匿名 (未验证) 提交于 2019-12-03 01:14:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have checked out the various questions on this. The first provides a huge question and answer (relevant? not sure) and the second provides a wrong answer as best answer. I have a branch called great-use-this . I have another branch called master . I want to merge great-use-this into master, and avoid auto-merging conflicts. What is the simplest and easiest way to do this? Note: I have actually figured this out (using a third branch and ours , but this would be good to have on SO anyway. 回答1: Yes, creating a third branch and doing a merge

Why is git rebase discarding my commits?

匿名 (未验证) 提交于 2019-12-03 01:14:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to rebase a branch on top of master, something I've done a thousand times before. But today, it's not working: > git status On branch mystuff Your branch and 'master' have diverged, and have 6 and 2 different commits each, respectively. (use "git pull" to merge the remote branch into yours) nothing to commit, working directory clean > git rebase First, rewinding head to replay your work on top of it... > git status On branch mystuff Your branch is up-to-date with 'master'. Untracked files: (use "git add ..." to include in what

Using github to host public git repositories whilst ensuring that sensitive data files remain untracked

匿名 (未验证) 提交于 2019-12-03 01:13:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: My app is hosted on Heroku and I have a public github repo too. My app has a config file containing my amazon S3 credentials. It's important to ensure that the file gets pushed to heroku but not github. So I was thinking that I could push my master branch to heroku and create a seperate github branch and ensure that it's .gitignore file references my s3.yml file. I could then just do "git push origin github:master" to push the github branch to github.com This works fine for the first commit. But then I switch to my master branch, write some

TSP - Branch and bound

匿名 (未验证) 提交于 2019-12-03 01:12:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm trying to solve the TSP with Branch and bound algorithm. I must build a matrix with costs but I have this problem: I have city with coordinates x and y. The cost of traveling is ceil(ceil(sqrt((x1-x2)^2+(y1-y2)^2))/v) + days spent in the city. V is speed. Days spent in the city depends from day when w comes to the city. For example if we arrived on Monday(t1) to city 1, we stay for 9 days but if we arrived on Tuesday, then we stay in the city for 4 days. x y t1 . t7 city 1. 79 - 36 9 4 8 5 5 7 8 city 2. 8 67 6 9 2 1 9 9 1 city