Skip to Content
Git: Mastering Version Control
book

Git: Mastering Version Control

by Ferdinando Santacroce, Aske Olsson, Rasmus Voss, Jakub Narębski
October 2016
Beginner
861 pages
20h 37m
English
Packt Publishing
Content preview from Git: Mastering Version Control

Attributes to export an archive

While exporting a snapshot of a Git repository with the archive command (refer to Chapter 10, Patching and Offline Sharing), it is possible to change the way the archive is made.

Getting ready

We'll use the attributes_example repository:

$ git clone https://github.com/dvaske/attributes_example.git
$ cd attributes_example

How to do it...

First, we'll set up the attributes needed in .gitattributes and commit the file on the exif branch:

$ git checkout exif
Branch exif set up to track remote branch exif from origin by rebasing.
Switched to a new branch 'exif'
$ echo 'europe_needles.jpg export-ignore' >> .gitattributes
$ git add .gitattributes
$ git commit -m 'Add .gitattributes'
[exif 783b7f7] Add .gitattributes
 1 file ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Git Version Control Cookbook - Second Edition

Git Version Control Cookbook - Second Edition

Kenneth Geisshirt, Emanuele Zattin(EUR), Aske Olsson, Rasmus Voss
Git Pocket Guide

Git Pocket Guide

Richard E. Silverman

Publisher Resources

ISBN: 9781787123205Supplemental Content