version-control

What to do about a 11000 lines C++ source file?

主宰稳场 提交于 2019-12-29 10:06:01
问题 So we have this huge (is 11000 lines huge?) mainmodule.cpp source file in our project and every time I have to touch it I cringe. As this file is so central and large, it keeps accumulating more and more code and I can't think of a good way to make it actually start to shrink. The file is used and actively changed in several (> 10) maintenance versions of our product and so it is really hard to refactor it. If I were to "simply" split it up, say for a start, into 3 files, then merging back

What to do about a 11000 lines C++ source file?

佐手、 提交于 2019-12-29 10:05:39
问题 So we have this huge (is 11000 lines huge?) mainmodule.cpp source file in our project and every time I have to touch it I cringe. As this file is so central and large, it keeps accumulating more and more code and I can't think of a good way to make it actually start to shrink. The file is used and actively changed in several (> 10) maintenance versions of our product and so it is really hard to refactor it. If I were to "simply" split it up, say for a start, into 3 files, then merging back

Do you version control the invidual apps or the whole project or both?

丶灬走出姿态 提交于 2019-12-29 07:41:50
问题 OK, so I have a Django project. I was wondering if I'm supposed to put each app in its own git repository, or is it better to just put the whole project into a git repository, or whether I should have a git repo for each app and also a git repo for the project? Thanks. 回答1: It really depends on whether those reusable apps are actually going to be reused outside of the project or not? The only reason you might need it in a different repo is if other projects with seperate repos might need to

How to modify the default Check-in Action in TFS?

落爺英雄遲暮 提交于 2019-12-29 07:31:24
问题 The default check-in action for a work-item is "resolve". I'd like to set it to "associate" so that this work item isn't automaticaly closed if I check-in stuff too fast. How can I do that? 回答1: Yup, the check-in action can only be associated to a state transition (i.e. Active to Resolved). In my blog post that Fredrick linked to (http://www.woodwardweb.com/vsts/top_tfs_tip_3_r.html) I talk about how to remove that. You'll need to customize the work item for everyone in your team project to

How to set up SVN repository in xCode 9.0

北城以北 提交于 2019-12-29 06:57:08
问题 With xCode 9.0, I am facing problem with SVN setup. I could not find any option to add SVN repository which was working proper with earlier versions of xCode. In source control, I am getting GIT everywhere. I am using SVN for long time and was properly working with earlier versions of xCode but this is not working with xCode 9.0. 回答1: If you have older version of xcode and above method of upgrade is not working or cannot be used then Terminal can be used to upgrade. Go to Terminal change

What does hg copy do?

北城余情 提交于 2019-12-29 06:44:11
问题 We recently did a hg copy of a directory in our repository. We thought it does something like cp -a and hg add and maybe flag somehow that this file has been copied from another file inside the repo (so hg annotate shows the original committer). But it now seems that hg copy does more or different stuff than that. I couldn't really find much on how exactly copy works. So: What exactly does hg copy do and what special treatment does this cause in the future? If it turns out to do "the wrong

How to convince a company to switch their Source Control [closed]

醉酒当歌 提交于 2019-12-29 06:44:06
问题 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 5 years ago . My current place of employment is currently in a transition, new ownership has taken over, things are finally getting standardized and proper guidelines are being enforced. But we are still using VSS, there really isn't any reason for using it other then that's what whats

How to add and commit removals made with “rm” instead of “git rm”?

心已入冬 提交于 2019-12-29 03:33:06
问题 I deleted a bunch of files and directories from a Git repository using rm , the Finder, etc. I'm looking for a Git command that'll record these to the index as marked for removal, as if I had called git rm on them. I understand git add -u will do this, along with a bunch of other things. I'd like my command to exclusively handle removals. 回答1: Without spaces in filenames: $ git rm `git ls-files -d` More robust: $ git ls-files -z -d | xargs -0 --no-run-if-empty git rm 回答2: Take a look what

Rebasing remote branches in Git

房东的猫 提交于 2019-12-29 02:23:09
问题 I am using an intermediate Git repository to mirror a remote SVN repository, from which people can clone and work on. The intermediate repository has it's master branch rebased nightly from the upstream SVN, and we are working on feature branches. For example: remote: master local: master feature I can successfully push my feature branch back to the remote, and end up with what I expect: remote: master feature local: master feature I then re-setup the branch to track the remote: remote:

Revert changes to a file in a commit

孤街醉人 提交于 2019-12-29 02:21:12
问题 I want to revert changes made by a particular commit to a given file only. Can I use git revert command for that? Any other simple way to do it? 回答1: The cleanest way I've seen of doing this is described here git show some_commit_sha1 -- some_file.c | git apply -R Similar to VonC's response but using git show and git apply . 回答2: Assuming it is ok to change the commit history, here's a workflow to revert changes in a single file in an earlier commit: For example, you want to revert changes in