Skip to content

Commit

Permalink
Updating chapter6
Browse files Browse the repository at this point in the history
with changes from PR#805
  • Loading branch information
daftano committed Aug 6, 2014
1 parent ff3b6ff commit bbcc26c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion it/06-git-tools/01-chapter6.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ Once again, this changes the SHAs of all the commits in your list, so make sure

### The Nuclear Option: filter-branch ###

There is another history-rewriting option that you can use if you need to rewrite a larger number of commits in some scriptable way — for instance, changing your e-mail address globally or removing a file from every commit. The command is `filter-branch`, and it can rewrite huge swaths of your history, so you probably shouldn’t use it unless your project isn’t yet public and other people haven’t based work off the commits you’re about to rewrite. However, it can be very useful. You’ll learn a few of the common uses so you can get an idea of some of the things it’s capable of.
There is another history-rewriting option that you can use if you need to rewrite a larger number of commits in some scriptable way — for instance, changing your e-mail address globally or removing a file from every commit. The command is `filter-branch`, and it can rewrite huge swaths of your history, so you probably shouldn’t use it unless your project isn’t yet public and other people haven’t based work off the commits you’re about to rewrite. However, it can be very useful. You’ll learn a few of the common uses so you can get an idea of some of the things it’s capable of.

#### Removing a File from Every Commit ####

Expand Down Expand Up @@ -748,6 +748,12 @@ Another common case is that you forgot to run `git config` to set your name and

This goes through and rewrites every commit to have your new address. Because commits contain the SHA-1 values of their parents, this command changes every commit SHA in your history, not just those that have the matching e-mail address.

### The Very Fast Nuclear Option: Big Friendly Giant Repo Cleaner (BFG) ###

[Roberto Tyley](https://github.com/rtyley) has written a similar tool to `filter-branch` called the BFG. BFG cannot do as much as `filter-branch`, but it is _very_ fast and on a large repository this can make a big difference. If the change you want to make is in the scope of BFG capaility, and you have performance issues, then you should consider using it.

See the [BFG](http://rtyley.github.io/bfg-repo-cleaner/) website for details.

## Debugging with Git ##

Git also provides a couple of tools to help you debug issues in your projects. Because Git is designed to work with nearly any type of project, these tools are pretty generic, but they can often help you hunt for a bug or culprit when things go wrong.
Expand Down

0 comments on commit bbcc26c

Please sign in to comment.