Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gitignore question- how do I add a Windows shortcut file to gitignore

Tags:

github

I have some Windows shortcut files in my project folder that I don't need on my git when I do a push. How do I tell git to ignore them?

In my Windows Explorer, I have, for example, this shortcut: "LED Curtain.sch - Shortcut"

I've tried putting that line into .gitignore, and I've tried putting *.sch into .gitignore, but the shortcut keeps getting into my git.

What am I missing?

like image 722
user3573562 Avatar asked Aug 31 '25 20:08

user3573562


1 Answers

Adding the following in .gitignore file worked for me to avoid pushing shortcut folder into github.

## git ignore shortcut folder
*.lnk
like image 72
SL4566 Avatar answered Sep 05 '25 01:09

SL4566