branch

Why does git say I am 40 commits ahead when I seem up to date and a push-pull (no files) fixes it?

末鹿安然 提交于 2019-12-05 01:17:00
I switch to master and it says I am ahead by 40 commits: $ git checkout master Switched to branch 'master' Your branch is ahead of 'origin/master' by 40 commits. But when I then do a pull it says I am up-to-date: $ git pull origin master From https://github.com/dmcouncil/dmWorkflow * branch master -> FETCH_HEAD Already up-to-date. However I can resolve this (remove the 40 commits msg) with: Michaels-MacBook-Pro-2:dmWorkflow durrantm$ git push origin master Everything up-to-date and now the ' 40 commits ' message is gone: $ git status # On branch mdd_play_settings_and_topics_reports nothing to

How to Remove a Branch from the Middle of the Hierarchy?

谁说我不能喝 提交于 2019-12-05 00:28:11
I have a Team Project created with the "Standard" branch pattern from the ALM Rangers' Branching guidance: After creating it, I found that I only really needed the "Basic" pattern. That is, I don't need the "Service Pack" branch. Is there a way for me to remove the "Service Pack" branch and "heal" the hierarchy so that "Release" is under "Main" in the hierarchy? Right now, every changeset in the "Service Pack" hierarchy has a corresponding changeset in the "Release" hierarchy, as "Service Pack" has just been in the way. The simplest solution is to not remove or reparent. The service pack

Closing a GitHub Issue while on a different branch

梦想与她 提交于 2019-12-05 00:05:14
I am not working on the Master branch. I am working on a different one newFeature , which is also published on github. I know how to to close issues when working on the Master branch: Closes #XXX . However this only works when I am working on the Master branch, if I switch over to the other branch or a different one and do a commit with Closes #XXX it does not close the issue. My question is: Is it possible to do this and how do you do it? i'm pretty sure github issues are agnostic of branches. are you talking about a local branch or a tracking branch? if your not specifically tracking the

How do I use git-new-workdir on windows?

依然范特西╮ 提交于 2019-12-04 23:41:39
问题 I have a repo that has two branches, which i would like to work on simultaneously. After some reading I found git has a script git-new-workdir. Im trying run use the script from the git for windows bash but get the following error. $ git-new-workdir sh: git-new-workdir: command not found How do I use this script on windows ? 回答1: Due to some of the commands in the git-new-workdir functions not existing on windows, the script won't work. I have found this windows port of the script. Works

常用 Git 命令清单

放肆的年华 提交于 2019-12-04 23:25:36
原文链接: http://www.ruanyifeng.com/blog/2015/12/git-cheat-sheet.html 常用 Git 命令清单。几个专用名词的译名如下。 Workspace:工作区 Index / Stage:暂存区 Repository:仓库区(或本地仓库) Remote:远程仓库 一、新建代码库 # 在当前目录新建一个Git代码库 $ git init # 新建一个目录,将其初始化为Git代码库 $ git init [project-name] # 下载一个项目和它的整个代码历史 $ git clone [url] 二、配置 Git的设置文件为 .gitconfig ,它可以在用户主目录下(全局配置),也可以在项目目录下(项目配置)。 # 显示当前的Git配置 $ git config --list # 编辑Git配置文件 $ git config -e [--global] # 设置提交代码时的用户信息 $ git config [--global] user.name "[name]" $ git config [--global] user.email "[email address]" 三、增加/删除文件 # 添加指定文件到暂存区 $ git add [file1] [file2] ... # 添加指定目录到暂存区,包括子目录 $ git

What's your ideal branch architecture within git for web applications?

旧巷老猫 提交于 2019-12-04 23:25:27
问题 We're a small team of developers and building a web application. We're currently having a live, testing and several development environments. What branch architecture would you suggest, so ideally each developer can work on his feature(s), these can be tested and deployed without tangenting other developers/features? Currently, each developer has its own development branch and rebases into the testing branch. As soon as a feature is approved, the developer rebases his changes into the master.

Share publically a part of a private repo on Github

和自甴很熟 提交于 2019-12-04 22:57:20
问题 I'm wondering what's the best way to publically share on Github a file that's on a private repo on Github. I would like thet every time a make a push in my private repository automatically the file is updated too. In particular I have a .tex project: I would like to keep secret the tex files but I would like to make available to everyone the pdf file. Note I'm aware of the existence of the gitignore option, but I don't want to use it since I want to keep track of the improvements on the tex

How are git branches imported into mercurial with hg convert?

可紊 提交于 2019-12-04 22:50:37
I have a number of branches in a git repository: david@Panama ~/app: git branch -r origin/HEAD -> origin/master origin/master origin/newButtons origin/newFonts origin/serverView If I try and import this git repo into mercurial: david@Panama ~/: hg convert app ... david@Panama ~/app-hg: hg update 388 files updated, 0 files merged, 0 files removed, 0 files unresolved david@Panama ~/app-hg: hg branches default 1148:6d04af619607 It seems that the branches have been "lost" (in terms of them no longer being separated) and indeed merged into the tip: david@Panama ~/app-hg: hg log changeset: 1148

233 学习 Git Rebase

孤人 提交于 2019-12-04 21:57:52
有问题为什么不问问神奇的 man 呢? rebase 也算是我比较常用的一个指令了,但是很长时间以来,对这个指令的认识还是不够深刻,于是就找了个时间认真地读了一下 git rebase 的文档。这份文档不需要在网络上查找,在自己的电脑上直接使用 man git-rebase 就可以查看了。在这份文档中,被提到的几个重要的 rebase 参数就是 newbase 、 upstream 、 branch 。除此之外, -i 也是一个能够极大的提升使用体验的选项,允许我们交互式的选取需要操作的提交。 git rebase [-i | --interactive] [<options>] [--exec <cmd>] [--onto <newbase>] [<upstream> [<branch>]] 三个参数 在执行 git rebase 的之前,如果我们指定了 branch 这个参数,那么 git 会在开始 rebase 操作之前签出到 branch 。 接着,git 会把所有在当前分支但不在 upstream 分支的提交保存到一个临时区域。如果想要在 rebase 开始之前了解哪些提交会被移到临时区域,可以使用 git log <upstream>..<branch> 查看。 然后,如果我们设置了 newbase ,那么 git 会把当前分支重置到 newbase ,否则,就重置到

Git Release Branch with Squashed Commits

大城市里の小女人 提交于 2019-12-04 20:31:34
I'm trying to do a similar thing to this: Creating GitHub repository with only a subset of a local repository's history I currently have all my commits on master and now I want to make a branch called release that only has a single commit of all past commits and no history of the old commits. I tried using the method in that link but doing so caused any further merges into release to not merge automatically, which is somewhat annoying. (The error it gives is Squash commit -- not updating HEAD. Automatic merge failed; fix conflicts and then commit the result.) Is there a different way of doing