Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Starting out with Git and Sourcetree - importing an existing project

Tim Dawson June 18, 2014

I'm new to both Git and Sourcetree. Currently my projects have no formal version control, but I do have a sprinkling of files that have been renamed when there's been a revision. The usual 'filename.php' and 'filename2.php' stuff. Projects also contain a fair number of images and similar files which are unchanging and also directories which I'd probably want to exclude from Git altogether.

It seems that if I set up a repository in the root directory of my project I get a lot of stuff included that I really don't want. I'm looking for a way to filter it out that's a bit cleverer than going through the file list in 'Working Copy Changes' and deleting one by one (or even in blocks).

For example, is there a way to exclude the entire 'images' directory ?

1 answer

1 accepted

0 votes
Answer accepted
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 18, 2014

The easiest way would be to edit the gitignore file by hand. You can open this file by going to your Repository Settings > Advanced > Repository-specific ignore list > Edit.

http://git-scm.com/docs/gitignore

Tim Dawson June 18, 2014

Thanks, I think I can work out what to do now, provided I can get to grips with the pattern matching.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events