Bloom Lab
Pages
Home
Bloom Code Guidelines
Tuesday, January 12, 2016
Git Tips & Tricks: Case-sensitive Only filename changes
## What is the problem with it? If a directory listing finds `Foobar` file when git expects `FooBar`, git will assume it's really the same file, and continue to remember it as `Foobar`. ## Two Steps approach Renaming `Foobar` into `FooBar`:
1. Move your file aside in some *tmp* folder or with some suffix & commit it: mv Foobar Foobar_tmp git add -A git commit -m "renaming phase1" 2. Rename your file, move it back & commit. mv Foobar_tmp FooBar git add -A git commit --amend -m "renamed Foobar to FooBar" That's it. Now into your git repository you'll see at once that `Foobar` was *renamed* into `FooBar`, but not just *modified* as previously. It means, that since your teammates will pull your pushed changes, their `Foobar` file will really change the name to `FooBar`. ---- ## see Also * [Git Tips & Tricks: Tagging](http://bloomlab.blogspot.com.ee/2015/09/git-tips-trics-tagging.html) * [Git Tips & tricks](http://bloomlab.blogspot.com.ee/2014/01/git-tips-trics.html) * [Git Basics - Tagging](https://git-scm.com/book/en/v2/Git-Basics-Tagging) * [Git Config - core.ignoreCase](https://jk.gs/git-config.html) * [Keynote: Top JS frmeworks 2015](http://bloomlab.blogspot.com.ee/2015/03/top-javascript-frameworks-2015.html)
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment