branch

What's the best practice to fork an open source project? [closed]

痞子三分冷 提交于 2019-12-03 12:45:42
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 4 years ago . I need to customize an open-source project. The changes are for a specific organization and will not be useful to the public project. The code changes include disabling features not needed by the organization (affecting 5% of the code), customizing other features for the

How to work simultaneously on several different versions of files with git?

只愿长相守 提交于 2019-12-03 12:38:41
问题 I'm currently working on a my own neuroimaging toolbox that runs under MATLAB / SPM8 and most program files in my repository are MATLAB *.m files. I have different feature branches and one analysis branch, that I use for ongoing analyses using the current version. At the same time I am developing the code in master and feature branches, that are then constantly merged to master branch. Now the problem is that, the analyses I'm running in analysis branch do take a lot of time (even days), and

git: How to rebase all commits by one certain author into a separate branch?

时光怂恿深爱的人放手 提交于 2019-12-03 12:34:31
问题 I'm using some code for which no SCM is used + and receive occasional updates in the form of all project files although only some of them have been changed only a bit. Up till now I just put my own changes in a git repo and solved these "updates" with a manual git add -p session which is getting more and more annoying with the amount of my own changes (those that are not determined to be published yet) increasing, and since luckily I did git commit --author "the others" for aforementioned

Is conditional branching a requirement of Turing-completeness?

自古美人都是妖i 提交于 2019-12-03 12:23:26
问题 I've been searching the web and I'm finding somewhat contradictory answers. Some sources assert that a language/machine/what-have-you is Turing complete if and only if it has both conditional and unconditional branching (which I guess is kind of redundant), some say that only unconditional is required, others that only conditional is required. Reading about the German Z3 and ENIAC, Wikipedia says: The German Z3 (shown working in May 1941) was designed by Konrad Zuse. It was the first general

How to fork a non-GitHub repo on GitHub?

自闭症网瘾萝莉.ら 提交于 2019-12-03 11:58:06
Is there a best practice for this? I was thinking either to Create a repo, add original repo as upstream remote Create a "mirror" repo, then fork that Create a "mirror" repo, then create a "topic branch" Something else related: help.github.com/send-pull-requests This is what I ended up doing: Create new repo on GitHub Clone the new repo git clone git@github.com:svnpenn/spoon-knife.git Add source code from original repo cd Spoon-Knife git remote add upstream git://spoon.com/knife.git git fetch upstream git merge upstream/master Push original source code to new repo git push origin master At

Mercurial: keep default branch “active”

拟墨画扇 提交于 2019-12-03 11:53:43
问题 I am using mercurial with named branches, and notice that when I create a new branch of default, default is marked as an inactive branch. Eg: C:\data\solutions\test-repo>hg branches default 0:aeec280e6310 C:\data\solutions\test-repo>hg branch feature-branch marked working directory as branch feature-branch C:\data\solutions\test-repo>hg com -m "created new branch" C:\data\solutions\test-repo>hg branches feature-branch 1:1cb18d7fa554 default 0:aeec280e6310 (inactive) This is a problem because

Change root of a branch in git

戏子无情 提交于 2019-12-03 11:33:51
问题 I'm using git and want to change the base of an exiting branch. This is caused by a deployment system, which pulls this explicit branch into my production environment. When planning my releases, I create a tag every time I want to go live. But my branch has special changes too, so git reset --hard v1.0 won't work. Here a small example. I want this C---D---E deploy / A---B---F---G master \ v1.0 to become this C---D---E deploy / A---B---F---G---H---I---J---K master \ \ v1.0 v1.1 Maybe git

Moving master head to a branch

一个人想着一个人 提交于 2019-12-03 11:13:38
I have several feature branches and a master branch. Feature2 is done. Normally I would rebase (working with a remote SVN repo and would like to keep the history, so no regular merge) and ff-merge. But since master hasnt changed since I branched, I would like to move the master head (at E ) to G . Using git branch -f master G does not result in any visible changes, I assumed this is because G is on a different branch. Is it safe to use git update-ref -f master G here instead? Should I stick with rebase/ff-merge? Something even better? feature1 C-D / master A-B-E \ feature2 F-G Thank you. A

GIT多人协作

寵の児 提交于 2019-12-03 10:37:32
当你从远程仓库克隆时,实际上Git自动把本地的 master 分支和远程的 master 分支对应起来了,并且,远程仓库的默认名称是 origin 。 要查看远程库的信息,用 git remote : $ git remote origin 或者,用 git remote -v 显示更详细的信息: $ git remote -v origin git@github.com:michaelliao/learngit.git (fetch) origin git@github.com:michaelliao/learngit.git (push) 上面显示了可以抓取和推送的 origin 的地址。如果没有推送权限,就看不到push的地址。 推送分支 推送分支,就是把该分支上的所有本地提交推送到远程库。推送时,要指定本地分支,这样,Git就会把该分支推送到远程库对应的远程分支上: $ git push origin master 如果要推送其他分支,比如 dev ,就改成: $ git push origin dev 但是,并不是一定要把本地分支往远程推送,那么,哪些分支需要推送,哪些不需要呢? master 分支是主分支,因此要时刻与远程同步; dev 分支是开发分支,团队所有成员都需要在上面工作,所以也需要与远程同步; bug分支只用于在本地修复bug,就没必要推到远程了