dvcs

Change threshold on the similarity index for git merge with renaming involved (like -M[n] --find-renames[=n] on diff)

孤者浪人 提交于 2019-12-04 19:21:23
问题 We have some configuration options for the rename detection heuristics during diff ( log , show ) and merge : diff.renameLimit The number of files to consider when performing the copy/rename detection; equivalent to the git diff option -l. diff.renames Tells git to detect renames. If set to any boolean value, it will enable basic rename detection. If set to "copies" or "copy", it will detect copies, as well. merge.renameLimit The number of files to consider when performing rename detection

Is there implementation of Git in pure Python?

元气小坏坏 提交于 2019-12-04 18:32:52
问题 Is there implementation of Git in pure Python? 回答1: Found Dulwich: Dulwich is a pure-Python implementation of the Git file formats and protocols. The project is named after the village in which Mr. and Mrs. Git live in the Monty Python sketch. Looks like a low-level library, the API did not appear friendly to my eyes, but there's a tutorial on the Github page 回答2: I know that this question is rather old, but I just thought I would add this for the next guy. The accepted answer mentions

Distributed Source Control - pushing individual changesets

旧时模样 提交于 2019-12-04 18:00:38
Working on a bit of a sticky problem and was hoping for some help from the community. Basically, our dev team is split up into two teams, lets say "Red" and "Blue" 3 repos: 1: Master 2: Red >> Clone of master 3: Blue >> Clone of master Each developer is cloning red or blue on their local machine where they are working. Both teams are working on various tasks for our main application. Each team has a clone of our Shared "Master" Repository on which they are applying their changesets. The changesets are verified at that level, at which point they are ready to be pushed into the Master. To

Local branches show-up on GitHub's “Network” view

强颜欢笑 提交于 2019-12-04 17:11:36
We are using Git and our workflow consists of a 'dev' and 'master' branch which lives on GitHub and each developer's local repository. No work is performed directly on 'master' or 'dev', but rather in local branches and only merges happen on 'dev' and later with 'master'. We do not push local branches to GitHub. For some reason developers' local branches show up in the "Network" view on GitHub and this clutters up the network diagram (I should point out that the branch itself doesn't exist under the list of branches on GitHub). My question is whether this is normal behavior and happens

What is the Fork & Pull Model in GitHub?

白昼怎懂夜的黑 提交于 2019-12-04 16:43:01
问题 I have heard this term used for managing a code base in GitHub. What does it mean? 回答1: As noted within the GitHub docs: The Fork & Pull Model lets anyone fork an existing repository and push changes to their personal fork without requiring access be granted to the source repository. The changes must then be pulled into the source repository by the project maintainer. This model reduces the amount of friction for new contributors and is popular with open source projects because it allows

How do I specify a merge-base to use in a 'hg merge'

只愿长相守 提交于 2019-12-04 13:12:13
问题 I'm trying to do a complicated merge in a complicated hg repository. I'm not happy with the "newest shared ancestor" that Mercurial chooses to use as the "base" to perform the merge. I'd like to specify a specific commit of my own choice to use as base. Is this possible, and if so, how? 回答1: Mercurial 3.0: You can now select the ancestor to use as a merge base. You do that by setting merge.preferancestor . Mercurial will tell you about it when this makes sense. With the example below, you

Does a Distributed Version Control System really have no centralised repository?

旧时模样 提交于 2019-12-04 11:50:32
问题 It might seem a silly question, but how do you get a working drectory set up without a server to check out from? And how does a business keep a safe backed up copy of the repo? I assume then there must be a central repo... but then how exactly is it 'distributed'? I always thought of a server-client (SVN) Vs peer-2-peer (GIT) distinction, but I don't believe that can be correct unless tools like GIT are dependent on torrent-style technology? 回答1: Re: 'torrent-style technology' - you're

Embeddable distributed version control system in Java?

爷,独闯天下 提交于 2019-12-04 11:36:47
问题 Is there a distributed version control system (like git or Mercurial) that can be used as an embedded library in Java applications (to implement versioned and synchronizable storage for application data), ideally written in pure Java and under a permissive license? 回答1: @Josh Moore's reply led me to JGit, which seems to be a competitor to JavaGit. JGit is pure Java and licensed under BSD. Some further digging unearthed HgKit, which aims to implement Mercurial in Java. It is still pre-alpha

Why doesn't git commit -a add new files?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 09:54:10
问题 I'm a bit new to git, and I fail to understand why git commit -a only stages changed and deleted files but not new files. Can anyone explain why is it like this, and why there is no other commit flag to enable adding files and committing in one command? BTW, hg commit -A adds both new and deleted files to the commit 回答1: Git is about tracking changes . It relies on you to tell it which files are important enough to track. You can achieve the desired affect like so: git add . ;git commit -a

Git - Switching branches (windows) & uncommitted changes

空扰寡人 提交于 2019-12-04 09:42:51
问题 I'm having a hard time understanding some git/DCVS concepts. Here's what happened: I created a git project, and imported it from an SVN repo I made some commits I wanted to experiment something, so I created a branch called constants-update I switched to constants-update branch, moved some files, deleted others and added many more I committed to this branch Now I'm trying to switch to my master branch using git checkout master I got this error: error: You have local changes to 'src/groovy