version-control

Safe master-master setup with git? (writable git mirror)

余生长醉 提交于 2019-12-12 02:39:08
问题 Have set up a master git repo and a mirror of it. After some experiments I detected a typical conflict resolution (mis)managment: without a warning, git just dropped conflicting commits -- a pretty much insane default setting. After some perusing of SO, I tried git config receive.denyNonFastForwards 1 git config receive.denyDeletes 1 but that does not solve the lost commit issue. When there are two conflicting commits in the master and in the mirror repo, git remote update git push --mirror

Git Merge Out of Sync Repos

别说谁变了你拦得住时间么 提交于 2019-12-12 02:29:11
问题 I started using git to track my customizations to a 3rd party web app. I interface with consultants that have been using git to track their changes for a while. I'll try to make this easy to understand. I have a copy of an export from one of our environments I started a repository using the export as a base [LOCAL] and have been committing to it regularly The consultants have their own repository that is up to date (excludes my changes) [3RDPARTY] I've forked their git repo [REMOTE] Now from

Add SCM to an Xcode project but meet an authentication issue

徘徊边缘 提交于 2019-12-12 02:29:00
问题 The situation is, I forgot to choose "use source control" in Xcode when creating my project. Then I found I can't update anything without source control selected, but also can't find where can add SCM to the project I've already created. Re-create a new project is a stupid idea, so if anyone met the same issue before PLZ gimme a hand :) Update 1: I tried command line to set up git repository and it succeeded. But just add git to project is not enough, you have to add it to the oragnizer as a

Is there a way to prevent code comments to be marked as changes in the diffs obtained from version control? (CVS/SVN)

折月煮酒 提交于 2019-12-12 01:45:02
问题 Is there a way to prevent code comments to be marked as changes in the diffs obtained from version control? (CVS/SVN) I hate the differences showing 100's of changes when there are only a handful due to the update in the comments for CVS info like log or id. 回答1: How could you expect a source control system to store a new version of the file and then ignoring the fact it has stored a new version? 回答2: Comments themselves would be counted as changes - however you could run the code through a

git merge vs rebasing

廉价感情. 提交于 2019-12-12 01:36:05
问题 I am using git from almost 2 years and now I am confused whether to rebase a branch or merge the branch with master. I have searched this site and did not find any question related to my specific reasons/argument. I personally never encouraged anyone to rebase a branch. I always insisted everyone to merge the branch to master. Off course in some special cases where we had no other ways, except rebasing or creating a new branch, I opted for rebasing. The reason why I never encouraged and

How do I move TFS 2013 code to a new local working folder after upgrading solution to VS 2015?

跟風遠走 提交于 2019-12-12 00:45:51
问题 I've upgraded a VS 2013 solution to Visual Studio 2015 using these steps. Now I want to move the project from the Projects folder under VS 2013 to the VS 2015 Projects folder. The code is checked in to Team Foundation Server 2013. What steps do I take to change the TFS working folder? 回答1: I think you want the following In VS 2015 (with no solution loaded) open Team Explorer at the Home section In the "Solutions" section expand the drop-down beside "Workspace:" and select "Manage Workspaces..

Need for a bare repo in GIT

巧了我就是萌 提交于 2019-12-11 23:59:24
问题 While reading the tutorials I keep hearing that I need to create something known as a bare repository for sharing all the files in the repo. I also hear that a bare repo does not contain any of the worfiles. If it does not have any workfiles then what will the other users clone on their local machines??? I currently have a directory in my linux server which i need to share among several users which will be accessing through eclipse ide's. Can anyone explain the issues highlighted above in

Gerrit doesn't accept newly created change/branch

醉酒当歌 提交于 2019-12-11 23:23:09
问题 I have just created a new change, that I wish to pull to Gerrit. I did it (I hope) the usual way, i.e. create new branch, do magic , commit. Now, I want to push changes to Gerrit. So... git checkout 82-changes-and-fixes-to-files-view git push origin HEAD:refs/for/82-changes-and-fixes-to-files-view (crunch, crunch) ! [remote rejected] HEAD -> refs/for/82-changes-and-fixes-to-files-view (branch 82-changes-and-fixes-to-files-view not found) Branch not found? Hm... Something came to my mind, that

Automatically rebase Git sub-branches

不羁的心 提交于 2019-12-11 23:09:54
问题 Say I have a git history like this: A--B--C--D <master> \--E--F <topic1> \--G <topic2> That is, I have two topic branches, where one feature depends upon another. In the meantime, work has been done on master , so I want to rebase topic1 . This results in: A--B--C--D <master> | \--E'--F' <topic1> \--E--F--G <topic2> That is, topic1 was rebased but topic2 was not. I want to get to this: A--B--C--D <master> \--E'--F' <topic1> \--G <topic2> But if I simply do git rebase topic1 topic2 , Git will

git for two versions of software (free and paid)

旧时模样 提交于 2019-12-11 20:34:01
问题 Is it possible with git, or any VCS, to maintain two versions of essentially the same software (a "free" version and a paid version) within one repository? I envision a master branch (maybe the "free" branch) and a paid branch in which I merge the "free" branch into. I am not well versed in this area so my thinking and terminology may not be entirely accurate. I haven't tried this as even if it works, it may not be the best approach. Thanks! 回答1: Such business logic should be implemented in