version-control

How to make sure teammates don't screw up the git repo by rewriting history?

怎甘沉沦 提交于 2019-12-22 18:27:20
问题 Common advice seems to be not to rebase, reset, or perform other "history-rewriting" operations after commits have been pushed. The recommendation is to perform all these kinds of slicing and dicing on your own machine, but then once you've pushed it, to just let it be. This makes sense. But how can this policy be enforced? With multiple developers, how can we make sure that nobody does this? It seems there should be a way for git to programmatically know if it is rewriting history on

SharePoint 2010 Document library versions comment

心已入冬 提交于 2019-12-22 18:22:06
问题 I would like to force users to add their comments before checking-in document. When a user selects Check-in, the default popup page will show in order to select version and write comments, but comments field is not mandatory, can we make it as a required field?? 回答1: You could do it via EventReceiver: public class EventReceiver1 : SPItemEventReceiver { public override void ItemCheckingIn(SPItemEventProperties properties) { base.ItemCheckingIn(properties); string comment = (string)properties

It is possible to get TFS change set number from the local file system?

陌路散爱 提交于 2019-12-22 18:19:54
问题 I have a local copy of a solution. It is bound to TFS Is possible to derive the current change set information from the local file system without doing a call to the server? 回答1: Here is a workaround, if you can use the Revision number in the [assembly: AssemblyFileVersion("1.0.0.RevisionNumber")] you could set the change set information there. Aligning assembly version numbers with TFS Buildnumber, this way each time you build, each projects AssemblyInfo.cs would contain the change set info.

XCode Won't Commit To GIT

≯℡__Kan透↙ 提交于 2019-12-22 12:34:08
问题 Been googling for a while with no luck. I have been working on my app for a week and I'm trying to commit to git now, so I can start branching and try some new stuff. But I can't commit my changes. I get the following message: "The working copy "APP NAME" failed to commit files. fatal: Could not switch to '/Users/Leonne/Documents/iOS Projects/APP NAME/APP NAME/Resources': No such file or directory" I have initialized the git repository. I don't understand what could be going on. Before, I did

Git and binary files history

非 Y 不嫁゛ 提交于 2019-12-22 11:35:36
问题 This is a follow up on some similar " answered " questions about git handling binary files and how git can't follow file history very well. So, git can't properly follow file history . Heck, even git log --follow -M100% --name-only -- path-to-my-file won't do it, and I'm supposedly telling it to only follow files that are 100% similar! Then we are supposed to use other ways to find who to blame , such as bisecting . Problem here is: those doesn't seem to work with binaries. And accodring to

Forked GIT submodule, and changed source URL. But clone still pulls old source URL?

对着背影说爱祢 提交于 2019-12-22 11:21:28
问题 I have a submodule in my git project, which I have made some changes to, and uploaded to my own git server to fork it. I've changed the source URL in the master git repository to the new submodule's location, and ran git submodule sync so my .git/config file is up to date. Then i pushed everything to Bitbucket, where my data is stored. However, when I clone my main git repository, it is still pulling down the data for the submodule from the old location. Any idea what might be causing this to

How to set up SVN with files that are in an /htdocs directory structure

丶灬走出姿态 提交于 2019-12-22 10:58:39
问题 I'm having a slight issue wrapping my head around on how to set up Subversion when working with php files. I store all my files at c:\www[nameOfProject]\htdocs and I setup virtual hosts for each project. (c:\www\project1\htdocs\index.php maps to http://localhost/project1/index.php). How do you guys handle using SVN? Lets say I have c:\svnrepos\ which is where I store each repo for each project. Now ideally I would want to check out from the repo at c:\svnrepos\project1 to c:\www\project1

Jenkins How can i upload a text file and use it as a parameter

馋奶兔 提交于 2019-12-22 09:46:51
问题 I have a txt file that is holding a string inside, I want to be able to use this string in one of my scripts, so I'm wondering if there is a way to set the content of the file as one of the build properties or parameters which I'll be able to use in my scripts it should be the same as using one of the build environment properties. For example : ${JOB_NAME} which is holding the the job name, so in the same way I want to access the content of the file which is holding some value inside. Is it

Why is mercurial's hg rebase so slow?

断了今生、忘了曾经 提交于 2019-12-22 08:57:22
问题 The rebase extension to mercurial provides functionality similar to git's rebase . Letting the rebase execute takes something like 4 minutes (~240 s) for 100 commits. In my imagination this should be extremely fast, a few seconds at most, but clearly I'm missing something. What makes it take so long? Are the commits themselves just extremely expensive? 回答1: By default, rebase writes to the working copy, but you can configure it to run in-memory for better performance, and to allow it to run

Some code was lost after doing bzr commit --local, bzr pull, bzr commit

萝らか妹 提交于 2019-12-22 08:55:59
问题 A developer in my team has been using a branch bound to the server (IE, only using checkout, update, and commit), but also often uses the --local flag on commit and then commits to the server in a batch. She recently experienced a situation where she is missing some local commits, and can't find them in the repo OR her local code. She suspects that this is because she did a pull at some point in bettween local commits and server commits. Neither of us are particularly experience with Bazaar -