blog.avisi.nl

...per default – you may change this, but it won't work for all programs), git won't recognize when you change the casing of files in your repository. Workaround

mislav.uniqpath.com

Random list of useful git commands for advanced users. I found some of them useful...

...the following will run all modified or new Cucumber features by looking at your git status: git status --short | grep -v '^ D ' | grep '.feature' | sed 's/.. //' | tr '\n' ' ' | xargs geordi...

eagain.net

Quick introduction to git internals for people who are not scared by words like Directed Acyclic Graph. The linked page offers a simple yet concise explanation of how git is...

...a simple diagram, so you get a sound understanding of how each command affects git's structure...

makandra dev

A nice way to stage absolutely all changes (edits, additions, deletions):

blog.plenz.com

If you recorded a bad fix for a conflict, you can tell git to forget that bad resolution: git rerere forget your_file.rb Afterwards, the badly resolved file will still be...

...in your working directory. To get it back with confict markers, say: git checkout -m your_file.rb Resolve the conflict again, properly now...

This is called "cherry-picking". git cherry-pick commit-sha1 Note that since branches are nothing but commit pointers, cherry-picking the latest commit of a branch is as simple...

git cherry-pick my-feature-branch Be aware that cherry-picking will make a copy of the picked commit, with its own hash. If you merge the branch later...

...to checkout the branch groups, you can simply say this in recent versions of Git: git fetch origin git checkout groups This will automatically track origin/groups from a local branch...

In older Git versions you need to say this: git fetch origin git checkout --track origin/groups

Make a new commit now, with a message like "fix". Do a git rebase -i OLD_COMMIT~ In the editor window that opened, move the "fix" commit directly...

...fixup". Save the file. If there are conflicts, solve them, add them, and do git rebase --continue

...stalled like this: [err :: host.name.tld] Username: It turned out that I this originated from GitHub. We had a gem in...

...our Gemfile that explicitly pointed to a GitHub URL like that: gem 'foogem', :git => 'https://github.com/blubb/foogem.git' The URL was returning a 404 which caused the problems. You have to...

Sometimes, due to git or other "accidents", important files get deleted or overwritten. At a state when even Ctrl+Z doesn't work anymore, you maybe can rescue your files...

...Make an initial commit with Linear ID and the name of the issue using git commit --allow-empty -m Read the complete issue Reread the complete Issue and check if...

...the merge request Within your feature branch, merge the current master and push using: git pull origin master git push -u origin feature-branch-name You're encouraged to use...

stackoverflow.com

...ID 1] My feature You can revert a single commit using the following syntax: git revert commit_sha2 To revert changes that are split across multiple commits, use the --no...

git revert --no-commit commit_sha3 git revert --no-commit commit_sha1 git commit -m "Revert Story...

makandra dev
ndpsoftware.com

Make sure you understand differences between git's areas (such as stash, workspace, upstream, etc.) and what commands affect which areas...

github.com

Grit gives you object oriented read/write access to Git repositories via Ruby...

makandra dev
robots.thoughtbot.com

...and were subsequently abandoned. We decided we wanted to clean up a bit, and git made that easy...

In your ~/.gitconfig: [core] editor=nano

stackoverflow.com

...work? There is hope! The linked article tells how to recover from an accidental git reset --hard. On a Mac You will need to install GNU find utils as described...

...you select from a list of all started and finishes stories. Then it runs git commit with the generated message (i.e. all staged changes will be commited). When running for...

pivotallabs.com

...we didn't lose any changes. Our solution is to clone the project's git repository into a folder inside a shared Dropbox folder...

...deploy new features but the latest commits are not ready for production? Then use git merge master~n to skip the n-last commits. Tip A big advantage of merging...

...duplicate commit messages in your history. Example It's time for a production deployment! git log --pretty=format:"%h - %s" --reverse origin/production..origin/master 0e6ab39f - Feature A 6396de5f - Feature B...

kernel.org

The ‘merge.*.driver` variable’s value is used to construct a command to run to merge ancestor’s version, current...

Optional further commit messages in the body Also see Howto: Write a proper git commit message To quickly generate such commit messages, add a new link "Commit" to your...

...title"]').innerText : story.querySelector('[name="story[name]"]').value); let id = story.dataset.id; if (id && title) { let gitptTitle = '[#' + id + '] ' + title; if (storyTitles.indexOf(gitptTitle) == -1) { storyTitles.push(gitptTitle); } } }); if (storyTitles.length > 0) { prompt('Your commit message...