dvcs

有 Github 帐号 ≠ Github

痞子三分冷 提交于 2019-11-27 12:58:33
原文来自我在 Segmentfault 的回答: GitHub 应该放什么类型的代码? 这是一个误会 我想,现在很多程序员都对 Github 存在误解。 大多都是觉得『虽不明,但觉厉』的样子,以为有个 Github 帐号就算是世界级的程序员了。 由于公司招聘有 Github 加分 ,所以很多人都把 Git 地址贴过去,然后就这样: 其中不乏工作 5 年以上的,煞有介事的把 空无一物 的 Github 地址粘贴过去。 个人来说,我要看应聘者的 Github,就是看你 做了什么项目 编码风格如何 能不能用 Git 做好版本控制 commit message 写得怎么样 工程管理习惯 等等 从一个小地方能看出很多东西,我想如果 10 来分钟就能大致了解一个人的水平如何,不是能很好的节省招聘成本,为双方省时间么? Markdown 现在有很多工作 5 年以上的程序员, Markdown 都不会好好写(我不仇视也不鄙视这样的人,因为都是可以学的)。Github 一个仓库下来总要写个 README.md 的吧? README.md 也能告诉我很多信息: Markdown 水平不说 文档的编写风格决定了我能不能跟 TA 做朋友(无所谓的态度、乱糟糟的文档,我不喜欢这样的程序员,哪怕他水平比我高很多,团队协作的时候他会不在乎很多东西) 把合作对象当做用户来友好对待(一个好的 README.md

How can I completely replace a bitbucket repository with another repository?

折月煮酒 提交于 2019-11-27 12:24:29
问题 I recently had to make a couple of changes which required rebuilding the repository using hg convert. Unfortunately, this means the bitbucket repo is now inconsistent with the copy I have locally. I don't want to just "blow away" the repo as it exists on bitbucket, because that gets rid of all the other customizations / issue tracking etc. that are associated with the project there. Is it possible to completely wipe the repository from Bitbucket's view of things and push everything from my

Introduction to Mercurial

让人想犯罪 __ 提交于 2019-11-27 11:58:28
问题 I have just begun working on a project which uses Mercurial as a version control system, and I need some basic tips on how to use this. Please use this question to give some introductory tips on this technology. The official Mercurial site Especially, I am looking for tips on the best programs to use and the best techniques to use (branches, in and out-checking etc. I need to learn the best-practices!) 回答1: I know you already have the Mercurial site but the resource most useful to me was the

How to manage concurrent development with mercurial?

▼魔方 西西 提交于 2019-11-27 11:42:14
问题 This is a best practice question, and I expect the answer to be "it depends". I just hope to learn more real world scenarios and workflows. First of all, I'm talking about different changes for the same project, so no subrepo please. Let's say you have your code base in an hg repository. You start to work on a complicated new feature A, then a complicated bug B is reported by your trusted tester (you have testers, right?). It's trivial if (the fix for) B depends on A. You simlply ci A then ci

How do I clone a sub-folder of a repository in Mercurial?

青春壹個敷衍的年華 提交于 2019-11-27 10:50:56
I have a Mercurial repository containing a handful of related projects. I want to branch just one of these projects to work on it elsewhere. Is cloning just part of a repository possible, and is that the right way to achieve this? Martin Geisler What you want is a narrow or partial clone , but this is unfortunately not yet supported. If you already have a big repository and you realize that it would make sense to split it into several smaller repositories, then you can use the convert extension to do a Mercurial to Mercurial conversion . Note that this creates a new repository foo and you

Mercurial with multiple projects

浪子不回头ぞ 提交于 2019-11-27 10:45:19
问题 I have a couple of projects with different release cycles sitting in my SVN repository. Releases are created by using the classic tags structure in SVN. When there are bugs to fix in releases a branch is created from a tag, the bug is fixed and then merged from there into trunk. Now, for multiple reasons, I want to switch from SVN to mercurial with a central push site. Question: Which is the best way in mercurial to organize multiple projects that share little code between them? Should I

How to automatically remove all .orig files in Mercurial working tree?

拟墨画扇 提交于 2019-11-27 10:40:51
问题 During merges mercurial leaves .orig file for any unresolved file. But after manually resolving problems and marking a file correct it does not delete the .orig file. Can it be automatically removed by some command? I work on a Mac so I can use something like: find . -iname '*.orig' -exec rm '{}' ';' and alias it or something, but I'd rather use something like hg cleanup... UPDATE: Since some time now, Purge extension is bundled with Mercurial and solves this problem nicely. 回答1: Personally,

Mercurial: Merging one file between branches in one repo

僤鯓⒐⒋嵵緔 提交于 2019-11-27 09:46:28
问题 When I have two branches in Hg repo, how to merge only one file with another branch, without having all other files from changeset merged? Is it possible to merge only certain files, instead of whole changeset? 回答1: WARNING: such a "dummy merge", as is recommended by @Martin_Geisler, can really mess you up, if later you want to do a true merge of the two branches. The dummy merge will be recorded, and say that you merge into the branch you did the dummy merge to -- you will not see the

How does git track source code moved between files?

半城伤御伤魂 提交于 2019-11-27 09:24:01
Apparently, when you move a function from one source code file to another, the git revision log (for the new file) can show you where that code fragment was originally coming from (see for example the Viewing History section in this tutorial ). How does this work? It doesn't track them. That's the beauty of it. Git only records snapshots of the entire project tree: here's what all files looked like before the commit and here's how they look like after. How we got from here to there, Git doesn't care. This allows intelligent tools to be written after a commit has already happened, to extract

Git: merging public and private branches while while keeping certain files intact in both branches

醉酒当歌 提交于 2019-11-27 07:17:24
I've read a few git questions here, but could not find an answer to this one: I have a public and a private branches where I want to allow certain files to diverge. Those are configuration files with passwords and my local customizations. I do want to be able to merge the branches both ways: from private to public and back, but I do not want to ever have those specific files merged automatically. Is there a way to set up git this way? I'd love to find an automated solution :) - so that merging could be done as usual. EDIT: here's the solution that worked for me (Thanks to VonC for the advice