branch

> You asked to pull from the remote '--prune'

匿名 (未验证) 提交于 2019-12-03 09:52:54
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm getting this error when using one of my aliases bdone You asked to pull from the remote '--prune', but did not specify a branch. Because this is not the default configured remote for your current branch, you must specify a branch on the command line. This is the alias I use alias.bclean !f() { git branch --merged ${1-master} | grep -v ${1-master}$ | xargs git branch -d; }; f alias.bdone !f() { git checkout ${1-master} && git up && git bclean ${1-master}; }; f I have nothing to commit nothing to commit, working directory clean 回答1: You

git push to the forked prj; pull request to a parent branch

匿名 (未验证) 提交于 2019-12-03 09:52:54
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: When I forked the project initially and set up my env I had this. > git branch - a remotes / origin / HEAD -> origin / master remotes / origin / master remotes / upstream / master I do not have "push" permission to the upstream project. I must send pull requests from my fork. A week later a new branch was created for work on a specific enhancement to upstream. The team may be working from this branch for many weeks. remotes / origin / HEAD -> origin / master remotes / origin / master remotes / upstream / new - project - feature

Checkout branch on different remote

感情迁移 提交于 2019-12-03 09:46:19
I have a repo that has another remote upstream besides origin . I can do git checkout origin/master , but when I run git checkout upstream/master , I get: error: pathspec 'upstream/master' did not match any file(s) known to git. This does not work either: $ git fetch upstream From https://github.com/getsentry/sentry * branch HEAD -> FETCH_HEAD $ git co -b asdf --track upstream/master fatal: Cannot update paths and switch to branch 'asdf' at the same time. Did you intend to checkout 'upstream/master' which can not be resolved as commit? How to check out branches on upstream remote as I do on

Does GitHub garbage collect dangling commits referenced in pull requests?

无人久伴 提交于 2019-12-03 09:40:42
The following situation arises from time to time… I git checkout -b experiment , commit some experimental changes, and open a pull request. After some discussion, the pull request is rejected. If I were now to delete the remote branch, would this render the diff inaccessible at some point, or does GitHub ensure that commits which appear in pull requests are not garbage collected even if they don't appear on any branch? I would like to delete dead branches, but only if doing so will not diminish the historical value of rejected pull requests. No, they will not be gc's because they're not wholly

Git Submodule has a wrong reference to its remote repository

匿名 (未验证) 提交于 2019-12-03 09:18:39
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have two submodules in my main repository, both linked to two another remote repositories. When I enter the 1st submodule I am getting a message "HEAD detached at xxxxxxxx" - which is fine, cause the remote repository and the submodule have the same ID (the 32 digits). When I enter the 2nd submodule I am getting a message "HEAD detached from yyyyyyyy" - which is not fine, cause the remote repository and the submodule do not have the same ID (the 32 digits). So, the 2nd submodule has a different ID than the repository it is linked

Git - pushing to remote repository

匿名 (未验证) 提交于 2019-12-03 09:14:57
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Git newbie here. created a new folder: mkdir hello_master cd hello_master touch test.txt git init git add test.txt git commit test.txt then cloned the repository git clone hello_master hello_local # made some changes to test.txt and committed it how do I push it to hello_master ? if I do a git push, it is complaining saying I can't push to hello_master . But if I go to hello_master , I can pull and get all changes from hello_local . What am I doing wrong? 回答1: Nothing. You just can't push to a non-bare repository. Because git wouldn't know

Create a new git repo off of a branch in a directory

匿名 (未验证) 提交于 2019-12-03 09:14:57
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: In my Git repo, I have a directory A. In a branch, I've created a directory B under A. Is there a way to create/initialize a new Git repo in directory B? Would copying that directory, clearing all of the .git data, and do a git init in that new copied directory do the trick? 回答1: Probably, but you'd lose all of your file history. This isn't a great approach. I'd think it's a better practice to clone the whole repo to a new folder, then discard the files you don't want using git rm . 回答2: Note that you can split a git repo, making a

How to debug “Pull request cannot be automatically merged.” in TFS?

匿名 (未验证) 提交于 2019-12-03 09:14:57
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: We use TFS 2017 (15.117.26714.0) with git. When we try to make a pull request, TFS says "Pull request cannot be automatically merged.". I'm just trying to figure out what's happening but I didn't find any message on why the pull request cannot be automatically merged. Do you know how to debug "Pull request cannot be automatically merged."? Is there a hidden option or a link to a log that can help me? Update You can find a little report about the job that is supposed to execute the merge during the pull request on a dedicated page of the web

git checkout < branch > failure for local changes

匿名 (未验证) 提交于 2019-12-03 09:14:57
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am new to Git. It seems to be a fantastic non-liner workflow based on the Directed Acyclic Graph. According to the git checkout doc : git checkout <branch> To prepare for working on , switch to it by updating the index and the files in the working tree, and by pointing HEAD at the branch. Local modifications to the files in the working tree are kept, so that they can be committed to the <branch> . I have 2 branches: master dev Both branches are clean and up-to-date. I did this: git checkout dev <change a tracked file> git checkout master

rebasing config spec in clear case

匿名 (未验证) 提交于 2019-12-03 09:14:57
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am new clearcase I am trying to rebase the branch m_tool. Could you please tell me how should i go about rebasing for the following config spec? element * CHECKEDOUT element * DATASOURCE element /entities/... /main/LATEST element * .../m_tool/LATEST mkbranch m_tool element * .../branch2011/LATEST element * TAG_2010_OCT_02 element * .../m_dd_lt_hfix/LATEST element * TAG_2010_02_DEV_BASE element * /main/LATEST end mkbranch m_tool Thank you, Dennis 回答1: " Rebasing " is a merge between a parent UCM stream and a direct child Stream. What you