4

I am using GitKraken and wonder if there is a way to ignore temporary files.

I haven't found something to do this. I tried it with a .gitignore file but it didn't work.

A-Sharabiani
  • 13,270
  • 12
  • 87
  • 109
Yellown
  • 226
  • 5
  • 15

1 Answers1

2

You can format your .gitignore using patterns described below.

Exclude patterns

example.mp4    # exclude a single file named example with .mp4 extension  
*.mp4          # exclude all files with .mp4 extension  
example/       # exclude folder named example  
example/*.log  # exclude all *.log files in example folder  

After you've specified your patterns you need to commit your .gitignore

git add .gitignore
git commit -m "Added git ignore file"

If you are already tracking a file and want to untrack it

Untracking files

git rm --cached example.log

The above command will delete file example.log from tracking BUT not from your local file system.

Reference

Ignoring files

e.doroskevic
  • 1,969
  • 14
  • 25
  • thx for your answer. Im currently not at my home PC so i cant test it but where can i open the shell (since now i used only the gui of GitKraken) – Yellown Jul 19 '16 at 12:23
  • Git kraken must have git shell coming with it. So just check it out on your system – e.doroskevic Jul 19 '16 at 12:26
  • for some reason git was not installed (i tryed "git --version" in powershell) so i [installed](https://git-scm.com/download/win) git and did "git rm --cached -r ." & "git add ." with powershell in my Project directory but it is still not working. When i open my project i get changes in MyProject/Libary/CurrentLayout.dwlt for example – Yellown Jul 19 '16 at 16:44
  • i also tried to remove all generated and temporary files and pushed. But when generating the new files gitkraken tracks them though i have the ignore file. Any clue what i am doing wrong ? – Yellown Jul 19 '16 at 17:03
  • 1
    omg i got it :D i changed two things first i hat the wrong name my .gitignore was named unity.gitignore ([how to change](http://stackoverflow.com/questions/10744305/how-to-create-gitignore-file)) and then i removed the first "/" so "/[Ll]ibrary/" turned to "[Ll]ibrary/" – Yellown Jul 19 '16 at 17:21