Yes I know that that what I want (git cp a b) approximately equal to cp -R a b git add b However this adds files that aren’t in the repository. The closest I have gotten is cd a git ls-files > ../files.txt cd ../b cat ../files.txt | xargs git add almost works, but there […]
After I do a git rebase, the code lines I have added/modified are indented four spaces or more to the left of the respective code block. This is incredibly annoying and time-consuming to fix, not to mention it makes it unreadable for Objective-C (imagine if I was coding in python…?) Xcode (or whatever, git?) adds […]
I almost always use ‘git -w’ when viewing diffs or blames. Can I make that the default behavior with a configuration option?
git status shows me, that few files are modified. But when I execute git diff with any of parameters below, it’s empty. –ignore-space-at-eol Ignore changes in whitespace at EOL. -b, –ignore-space-change Ignore changes in amount of whitespace. This ignores whitespace at line end, and considers all other sequences of one or more whitespace characters to […]
How do we prevent leading whitespace being added while Visual Studio 2015 touches files when merging branches. Whitespace Shown in Stash Example above is what is show in Stash during pull request.
I am trying to merge a branch that has a bunch of commits (~20). However the first commit is about re-indenting the whole code properly and all subsequent commits also contain whitespace changes, which I do not want. I am trying to reapply all those commits but I don’t know how to tell git to […]
I’m trying to apply patch generated from some git repository. Patch context line looks like this else if ( o is Item ) and in my code it looks like this else if (o is Item) When I apply patch $ git apply -v –check –directory=myroot –ignore-space-change –ignore-whitespace ../patches/0003-some-name.patch it says that error: while searching […]
I am trying to instigate some configuration control tools for our mysql databases. To start with we trained and installed GIT on all dev machines including DBA. I got a php script written that extract the definition of all db, all tables, functions,SP, views, and triggers and puts this is a directory structure. My initial […]
I’m looking to refactor the whitespace / identation mayhem in our project. For that I was using the untabify function in MSVS, which does just what I need. The problem is commiting it using Git, since it shows almost every line last edited by me, which is technically correct, but in this case not the […]
Say you have a repo with changes replacing tabs with spaces. I have uploaded one ad-hoc repo $ git clone https://github.com/albfan/whitespace-diff $ cd whitespace-diff $ cat -A file1 text$ ^Ianother text$ ^I^Itext$ $ git checkout HEAD^ $ cat -A file1 text$ ^Ianother text$ ^I text$ If you ask git for changes you get $ git […]