Tar Files

Make one:

tar -czvf myarchive.tar.gz myfile

Extract one:

tar -zxvf myarchive.tar.gz

Args:

c = create a new archive
x = extract files from an archive
f = specifying file to archive
z = filter archive through gzip
v = verbose output
This was posted 2 years ago. It has 0 notes.

Exporting the Contents of a Git Branch

git archive master | tar -x -C ~/destination-dir

This was posted 3 years ago. It has 0 notes.

Changing the URL of an SVN repo in your working copy

sudo svn switch --relocate old_url new_url

Manual page.

This was posted 3 years ago. It has 0 notes.

Reverting changes on a single file in SVN.

This removes local changes from a file:

svn revert [filname]
This was posted 4 years ago. It has 0 notes.

Grabbing the Contents of a File From a Previous SVN Revision

svn cat inc/additional.css -r r92245 > my.css

This was posted 4 years ago. It has 0 notes.

Reverting File Changes in GIT

To revert all uncommited changes:

git reset --hard

To revert a specific file:

git checkout filename

BUT if you have a branch with the same name as that file you need to add “—”, like:

git checkout -- filename
This was posted 4 years ago. It has 1 note.

Percent of Change

To calculate the percent of change, divide the amount of change by the original amount:

percent of change = change/original amount

For example:

What percent of change is 56 to 84?

84 - 54 = 30

30/56 ≈ .54 = 54%

This was posted 4 years ago. It has 0 notes.