branch

How can I fetch an unmerged pull request for a branch I don't own?

匿名 (未验证) 提交于 2019-12-03 08:48:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I need to pull in a specific pull request (that hasn't been processed into the main stream yet) in the NServiceBus repo: https://github.com/johnsimons/NServiceBus/commit/d8524d53094e8181716e771c1023e968132abc15 It's obviously not my repo, but I need the changes that exist in that pull request. What is the best way to do this? 回答1: To fetch a pull into your repository: git fetch git@github.com:jboss/jboss-common-beans.git refs/pull/4/head Then do whatever you want with FETCH_HEAD: git checkout -b new-branch FETCH_HEAD 回答2: git pull origin

How to I switch to a git branch that ignores files without deleting these files?

匿名 (未验证) 提交于 2019-12-03 08:46:08
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have branch master that ignores .idea in its .gitignore . From that, I created branch noIgnore that has no .gitignore . I found that checkout master deletes .idea . That's not the behavior I want. I want to keep .idea , just not track it, not on master . How do I do that? 回答1: You could stop tracking changes for a file in repo git update - index -- skip - worktree . idea Since you're tracking it in the other branch, then when you make changes you'll want to start tracking changes again git update - index -- no - skip - worktree .

SQL Server XML exist()

匿名 (未验证) 提交于 2019-12-03 08:46:08
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have some problems using the exist() and value() methods in SQL Server 2008. My XML looks like this: <?xml version="1.0" encoding="UTF-8"?> <library> <branches> <branch> <codelib>1</codelib> <name>Campus</name> </branch> <branch> <codelib>2</codelib> <name>47th</name> </branch> <branch> <codelib>3</codelib> <name>Mall</name> </branch> </branches> <books> <book type="SF"> <codb>11</codb> <title>Robots</title> <authors> <author>author1 robots</author> <author>author2 robots</author> </authors> <price>10</price> <stocks> <branch codelib="1"

add history to git repository or merge git repositories

匿名 (未验证) 提交于 2019-12-03 08:46:08
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Everybody understands something different by "merge git repositories", so here is my case. We had a TFS repository and we have checked out the sources at one point in time and made an initial git commit. Then we did normal development in git (branching, merging, etc.). The problem is that in the new repository we do not have history in out git repository and we would like to fix that. Therefore I have converted whole TFS repository to git repository and now I need to merge the converted TFS repository with the current git repository. As

Locking a branch in perforce?

匿名 (未验证) 提交于 2019-12-03 08:46:08
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Currently after I create a release branch, but when we have some time before we release, I sometimes open the entire branch for edit and then lock all files in order to prevent anybody from modifying anything during "code-freeze" period in the release branch. Is there a better way? Doing it my current way seems possibly like an incorrect use of the lock feature, is there a better way to keep somebody from checking in code without using branches. I though of P4 protect but I am not the admin on this perforce instance, and also dealing with

How to delete remotes/origin/{branch}?

匿名 (未验证) 提交于 2019-12-03 08:46:08
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: How do you delete a remotes/origin/{branch}? 回答1: use: git remote prune origin or use git remote prune origin --dry-run to preview what branches will be removed. As in git help remote prune Deletes all stale remote-tracking branches under . These stale branches have already been removed from the remote repository referenced by , but are still locally available in "remotes/". With --dry-run option, report what branches will be pruned, but do not actually prune them. 回答2: git push origin :[branch-name] . Source: http://progit.org/book/ch3-5

How to make Head point to master in git?

匿名 (未验证) 提交于 2019-12-03 08:44:33
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Please help to make Head point to master in git I tried to git rebase HEAD master and git checkout master Nothing of those helps. Updated: Strange I tried: git symbolic-ref HEAD refs/heads/master then git rev-parse refs/heads/master fc550e5ff2fe49d64ee1d8bf0da09b2b24bf2cd7 and then I got strange warning after the following command git rev-parse HEAD warning: refname 'HEAD' is ambiguous. fc550e5ff2fe49d64ee1d8bf0da09b2b24bf2cd7 New Update: There was HEAD branch in remotes -> origin . After removing it everything is ok. I do not have that

How to set develop branch as default in Github instead of master?

匿名 (未验证) 提交于 2019-12-03 08:44:33
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I know this can be done on the Admin page of a repository. Another default branch can be set there. And that would be the answer of this question. But I discovered (maybe a bug?) the following. If your master branch and develop branch are exactly the same, than a git clone will not clone the default "develop" branch, but still "master"!! If you commit something to the develop branch, remove your clone and than clone again, you will get the develop branch! Is this Git behaviour or Github? And can this be fixed to set it ALWAYS to

Travis CI testing branches with corresponding set of environment variables

匿名 (未验证) 提交于 2019-12-03 08:42:37
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a project that I'm trying to automate tests using Travis CI. I have a dev branch and a test branch, and they have different environment variables. For example, on the dev branch, I need to connect to a different API than the test branch, specified by an environment variable. So, when I run the build on the dev branch on Travis, how do I set it up so that it only tests with the dev set of environment variables, and likewise for build on test branch? 回答1: There is no great way to do this right now, but you can write a shell script that

Git “missing” commit

匿名 (未验证) 提交于 2019-12-03 08:42:37
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm in a situation where some changes made in a feature branch are not reflected in master, even though this branch was merged into it. I'm at a loss to understand why. For simplicity, let's say this commit has a hash "A" and changed file "file" This can probably best be illustrated by the following commands: $ git checkout master $ git branch --contains A * master feature_branch $ git log file | grep A (no output) $ git checkout feature_branch $ git log file | grep A A Can anyone explain what's going on here? More importantly, is there