dvcs

Will commits in git and mercurial repositories with the same history have the same hash?

萝らか妹 提交于 2021-01-28 02:54:48
问题 When using git to clone an hg repository, or when migrating from hg to git, will the hashes remain the same? 回答1: By inspection, the answer appears to be "no". hg clone ssh://some.server.com/path/hgproject/ git clone hg::ssh://some.server.com/path/hgproject/ Followed by: hg log -l 5 git log -n 5 Show different commit hashes for the same commits. While both git and hg use SHA-1 hashes, there must be a difference in what they are hashing, perhaps the metadata. Any tooling dependent on the

Will commits in git and mercurial repositories with the same history have the same hash?

拟墨画扇 提交于 2021-01-28 00:02:17
问题 When using git to clone an hg repository, or when migrating from hg to git, will the hashes remain the same? 回答1: By inspection, the answer appears to be "no". hg clone ssh://some.server.com/path/hgproject/ git clone hg::ssh://some.server.com/path/hgproject/ Followed by: hg log -l 5 git log -n 5 Show different commit hashes for the same commits. While both git and hg use SHA-1 hashes, there must be a difference in what they are hashing, perhaps the metadata. Any tooling dependent on the

Ignore changes to files that are already in repository

大憨熊 提交于 2021-01-27 23:48:32
问题 Adding files to .hgignore will prevent them from being tracked. But we have some files that we want to be in the repository - we just don't want users to ever commit changes. Is there a way to ignore changes to these files, so they won't get committed in an hg commit . 回答1: That cannot be done in Mercurial — a file is either tracked or untracked (and then optionally ignored). You should instead version a template file and then ignore the real file. So add config.template to version control

Moving master head to a branch

橙三吉。 提交于 2020-01-22 13:53:25
问题 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

DVCS how structure with large integrated code base, with multiple projects sharing much common code?

二次信任 提交于 2020-01-10 05:11:09
问题 I have a cvs repository, with mostly java code. Each package sits in it's own top level dir, like so, with the sourced laid out in typical java fashion. $CVSROOT/my.domain.module1/src/my/domain/module1 $CVSROOT/my.domain.module2/src/my.domain/module2 $CVSROOT/my.domain.share1/src/my/domain/share1 This means we can write build scripts that can easily pull any combination of packages out of the repository in order to build a particular shippable piece of software. So if I checked out my.domain

Internal Repository Setup

北慕城南 提交于 2020-01-06 19:58:46
问题 I have jumped on the GIT bandwagon lately. I am confused about which DVCS hosting to use. I am in a notion that i can setup my own thing on a dedicated/vps server. So, my question is that, how to setup my own internal remote repository management system on the dedicated server that i have? Please guide. Regards 回答1: On the server run the following command in a directory you want to use... git init --bare This creates an empty/bare repository on the server. On the client run the following

Internal Repository Setup

坚强是说给别人听的谎言 提交于 2020-01-06 19:58:37
问题 I have jumped on the GIT bandwagon lately. I am confused about which DVCS hosting to use. I am in a notion that i can setup my own thing on a dedicated/vps server. So, my question is that, how to setup my own internal remote repository management system on the dedicated server that i have? Please guide. Regards 回答1: On the server run the following command in a directory you want to use... git init --bare This creates an empty/bare repository on the server. On the client run the following

How does Git handle branches compared to SVN?

柔情痞子 提交于 2020-01-05 12:08:58
问题 Relatively simple question but I can't find much on the internet. All my search results simply show how to use git branches but doesn't explain how its different. I know that with SVN, creating a new branch of the trunk means to create a full copy of the trunk, into the 'branches' directory, and I also know that Git does not create full copy like SVN - so what does it do? This is more for writing facts in my DVCS research documentation rather than anything. Perhaps an extension to this would

How does Git handle branches compared to SVN?

瘦欲@ 提交于 2020-01-05 12:08:15
问题 Relatively simple question but I can't find much on the internet. All my search results simply show how to use git branches but doesn't explain how its different. I know that with SVN, creating a new branch of the trunk means to create a full copy of the trunk, into the 'branches' directory, and I also know that Git does not create full copy like SVN - so what does it do? This is more for writing facts in my DVCS research documentation rather than anything. Perhaps an extension to this would

On Windows, can we put different folders in 1 Git or Mercurial (hg) repository?

∥☆過路亽.° 提交于 2020-01-05 09:21:17
问题 On Windows, can we put different folders in 1 Git or Mercurial (hg) repository? Such as putting c:\ror c:\software projects\ruby c:\js test d:\peter_website all in 1 Git or Mercurial repository called code ? 回答1: No, this is not directly possible. What you could do is making seperate repositories for each dir and then combine them as submodules in another repository. I would advise to keep a repository about one project only. If these three dirs are for the same project, you might considering