version-control

Git merge - manual merge - forcing conflic having WHOLE old and new file version

拜拜、爱过 提交于 2019-12-12 04:03:28
问题 How to force git merge to generate conflict on all file or all file that differ to generate conflict having whole old and whole new version, example of such file : <<<<<<<<<<A A B C D OLD OLD OLD E F G ... Z ============ A B C D NEW NEW NEW EEEEEEE FFFFF GGG ... Z >>>>>>>>>>B The idea is that I would like to merge manually having whole contents of two files, no metter if lines are identical or one branch is inheriting from whole previous, example: $ echo ABC > file $ git add file $ git commit

Clone TFS-GIT repository to GIT repository (Linux) by using GIT commands

孤人 提交于 2019-12-12 03:48:02
问题 We have Redhat Linux server, GIT was already installed on this server and we need to create a local repository. We have TFS-GIT project in TFS 2015, we need to clone the TFS-GIT repository to the GIT repository on Linux by using GIT commands. For this task, we created a empty local repository on Linux, and getting "Fatal: authentication error to connecting TFS-GIT repository on windows server 2012 . We tried in different ways but still we are getting same error. can any one please advise on

Work items commits state control

狂风中的少年 提交于 2019-12-12 03:47:40
问题 I am using git under TFS, and I was associating commits to work items through #work-item i.e: git commit -m "fix #123" Now I want to be able to change its status with something like: git commit -m "Changed foo function. closed #125" But it did not work. Is it possible? 回答1: There isn't any way to achieve this feature for now. There is already a feature request submitted on User Voice , you can vote it: Update work items on commit for git. 回答2: For some months this feature ist implemented, but

git rebase --onto results on single commit

梦想的初衷 提交于 2019-12-12 03:29:15
问题 This question was migrated from Super User because it can be answered on Stack Overflow. Migrated 6 years ago . I want to create a branch out of master but I need this branch to have an empty tree. After a bit of researching I've come up with the following situation: Master branch have a single commit with a dummy file. I checkout a new branch I remove all files and commit I create a new commit with --allow-empty The following commands should get you up to that: $ git init $ touch dummy $ git

How do I undo the most recent local commits in Git?

北战南征 提交于 2019-12-12 03:26:15
问题 I accidentally committed the wrong files to Git, but I haven't pushed the commit to the server yet. How can I undo those commits from the local repository? 回答1: Undo a commit and redo $ git commit -m "Something terribly misguided" # (1) $ git reset HEAD~ # (2) << edit files as necessary >> # (3) $ git add ... # (4) $ git commit -c ORIG_HEAD # (5) This is what you want to undo. This does nothing to your working tree (the state of your files on disk), but undoes the commit and leaves the

Do all diffs get copied to source branch from destination branch during git merge?

◇◆丶佛笑我妖孽 提交于 2019-12-12 03:23:52
问题 I have been trying to get all the diffs from a dst branch to a src branch. I usually follow the following workflow. git checkout dst (switch to dst branch) git pull dst (fetch and merge changes on remote dst to local dst) git checkout src (switch to src branch) git merge dst (pull all diffs from dst to src?) [optionally if merge conflicts occur, I resolve merge conflicts and do] git commit However, after merge, I am seeing that not all diffs are copied to my src branch. For instance git diff

I tried to change the color of the status info, it does not work now

社会主义新天地 提交于 2019-12-12 03:16:38
问题 I tried to make colors a bit different while displaying status info, but I did manage to ruin something. When I type git status to see my unstaged files and stuff, the reply is : fatal: bad numeric config value 'blue' for 'color.status' in C:/....=gitconfig: invalid unit add and commit work still. How can i reset my settings? (I am new to git) Thanks for the answers! 回答1: Run git config --global color.status always . I think you accidentally set it to an invalid value. Quoting the man page

Files missing after *git svn clone*

自闭症网瘾萝莉.ら 提交于 2019-12-12 02:59:52
问题 I have a SVN repo and would like to use git from now on. I tried to clone the repo with 2 approaches. Normal SVN checkout git svn clone The first approach did just fine. Everything is fine and the project compiles. However, when I tried the second approach. I found that there were some files missing from the repo and therefore it wouldn't compile. Any idea what's going here? 回答1: Is your svn repository using svn:external? See this article for more details on the migration process. 来源: https:/

Undo a git merge when it has been pushed

烈酒焚心 提交于 2019-12-12 02:49:21
问题 How can I undo a merge when I have already pushed to master after merge? Here are my steps: git add -A git commit -m "some message" git fetch origin master:master git rebase master (resolve merge conflicts) git push -f origin my local branch I want to go back to the state where i was at step 2 回答1: You force pushed , meaning you overwrote the changes on a remote. Your computer can't fix it; however, if there is another computer with a local copy before you force pushed, you can force push

Skinnable Windows Forms App: Handle different icon sets

帅比萌擦擦* 提交于 2019-12-12 02:48:01
问题 When we started, we put all icons inside a folder in source control, and all Windows Forms projects reference icons inside that folder from their .resx file. Now that we decided to have different-looking GUIs, we created two more icon sets, all with same names, each into its own folder, so that when we want to use a different one, we just copy and paste into the "main" folder. The problem with this approach is source control: whenever we commit, we must be careful not to send our icons, if we