Solved

Git Settings in VS 2013

Posted on 2014-09-20
5
122 Views
Last Modified: 2015-05-04
I'm new with use of Git in Visual Studio.

I've created a repository in my web space and syncronization seems to work correctly. What I'm not able to configure is the exclusion of some folders from commits operations.
In VS ide I've found the Git Settings panel divided in Global Settings and Repository Settings. The first contains my credentials and the second one has two files called .gitignore and .gitattributes. I've attached .gitignore. The last two lines of the file contains folders to exclude. Every time I commit Installazioni and Simboli folders are included and i have to exclude manually. Someone can help me?
gitIgnore.txt
0
Comment
Question by:fantamen
  • 3
  • 2
5 Comments
 
LVL 28

Expert Comment

by:pepr
ID: 40339575
Were the Insallazioni and Simboli folders added earlier? If yes, the .gitignore does not apply to them.
0
 

Author Comment

by:fantamen
ID: 40339745
It's possible. However is there a method to ignore these files?

Thank you
0
 
LVL 28

Accepted Solution

by:
pepr earned 500 total points
ID: 40340327
You can tell git to forget it as if it was never added. For that, you can use a form of git rm command with --cache argument -- see http://git-scm.com/docs/git-rm . The command
git rm -r --cache Installazioni

Open in new window

without --cache would remove the directory physically. However, with --cache it will remove the directory only from the observed ones (cached, in index). The -r stands for recursive (that is also subdirectories.

Once removed from the index, the .gitignore will tell git to ignore the directory.
0
 

Author Closing Comment

by:fantamen
ID: 40758535
Thank you
0
 
LVL 28

Expert Comment

by:pepr
ID: 40759597
You are welcome ;)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
numbers ascending pyramid 100 141
This code tracks birthdays 3 62
Error when loading the database 16 58
C# Single Form 8 29
Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now