Quantcast

RFE: where do you prefer .gitignore files to be located/created

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RFE: where do you prefer .gitignore files to be located/created

SmartGit mailing list
We are considering to change the behavior of Local|Ignore for version 7.

When invoking Local|Ignore, to which .gitignore file should the pattern
be added?

- to the .gitignore file located in the same directory as the file (or
the closest tracked directory)? This is current behavior.

or

- to the .gitignore file located in the root directory of your repository?

Thanks for your feedback!

--
Best regards,
Marc Strapetz
=============
syntevo GmbH
http://www.syntevo.com

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFE: where do you prefer .gitignore files to be located/created

SmartGit mailing list
Actually, it's an RFC :)

--
Best regards,
Marc Strapetz
=============
syntevo GmbH
http://www.syntevo.com


On 26.03.2015 10:09, syntevo Support [hidden email] [smartgit] wrote:

> We are considering to change the behavior of Local|Ignore for version 7.
>
> When invoking Local|Ignore, to which .gitignore file should the pattern
> be added?
>
> - to the .gitignore file located in the same directory as the file (or
> the closest tracked directory)? This is current behavior.
>
> or
>
> - to the .gitignore file located in the root directory of your repository?
>
> Thanks for your feedback!
>
> --
> Best regards,
> Marc Strapetz
> =============
> syntevo GmbH
> http://www.syntevo.com
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFE: where do you prefer .gitignore files to be located/created

SmartGit mailing list
I've always used only the root .gitignore

In my experience this is by far the more common pattern in industry as in
open source projects.

Cheers

Le jeu. 26 mars 2015 10:13, syntevo Support [hidden email] [smartgit]
<[hidden email]> a écrit :

>
>
> Actually, it's an RFC :)
>
>
>
> --
> Best regards,
> Marc Strapetz
> =============
> syntevo GmbH
> http://www.syntevo.com
>
> On 26.03.2015 10:09, syntevo Support [hidden email] [smartgit]
> wrote:
> > We are considering to change the behavior of Local|Ignore for version 7.
> >
> > When invoking Local|Ignore, to which .gitignore file should the pattern
> > be added?
> >
> > - to the .gitignore file located in the same directory as the file (or
> > the closest tracked directory)? This is current behavior.
> >
> > or
> >
> > - to the .gitignore file located in the root directory of your
> repository?
> >
> > Thanks for your feedback!
> >
> > --
> > Best regards,
> > Marc Strapetz
> > =============
> > syntevo GmbH
> > http://www.syntevo.com
> >
> >
>  
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFE: where do you prefer .gitignore files to be located/created

SmartGit mailing list
In our company we only use .gitignore in the root which means we are not using SmartGit ignore feature We manually modify the .gitignore in that effect.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFE: where do you prefer .gitignore files to be located/created

SmartGit mailing list
I use both root and nested .gitignore files in the same repo.

Many of my projects pull in technologies from all across the board, and
sometimes individual components require different ignore policies. One
example is a Unity project that ignores .sln  and related files (because
they are generated by the Visual Studio Unity tools) but also has a nested
Helpers directory containing other .sln files for C#/C++ projects that *do*
need to be checked in. (I didn't choose the directory structure!)

We could probably fit all these rules into a single root .gitignore, but it
was cleaner to give Helpers a .gitignore file of its own.

So, for an Ignore UI to be useful to me, I'd need a way to choose which
.gitignore to use. Here's how I would probably do it:

Add a new panel to the bottom of the Ignore dialog, displaying a list of
nested directories starting from the current file's directory and working
down to the repo root. Each directory in the list has either a radio button
to allow it to be selected, or a "Create new .gitignore here" pushbutton,
depending on whether it already has a .gitignore file. Clicking that Create
button adds a radio button to that same directory and selects it. (The
purpose of this extra step is to help avoid accidentally creating a
.gitignore when you're more likely to want to add to an existing one.)

In my example, let's say the repo is in /Unity and we are looking at a file
in /Unity/Helpers/Source. The Source directory does not have a .gitignore
but both parents do, so the dialog panel would look something like this:

     /Unity/Helpers/Source  [Create new .gitignore here]
( )  /Unity/Helpers/.gitignore
(*)  /Unity/.gitignore

If a repo has only a single .gitignore (the most common case), select it by
default. If there's more than one, as above, the default could be either
the first or last one in the list, but if the user selects a different one
it would be nice to remember that selection for the next time the dialog is
used.

If you clicked the "Create..." pushbutton in this example, the display
would change to:

(*)  /Unity/Helpers/Source
( )  /Unity/Helpers/.gitignore
( )  /Unity/.gitignore

Actually you wouldn't *create* that new .gitignore quite yet; you'd wait
and create it if the user actually clicks OK on the entire dialog.

A way to simplify the default presentation a bit could work like this:
Initially, the directory list shows only directories that already have a
.gitignore file, and there would be a single Add new .gitignore pushbutton
below the list:

( )  /Unity/Helpers/.gitignore
(*)  /Unity/.gitignore

[Add new .gitignore]

This would be nice for the common case of a single .gitignore since it
would be the only thing in the list:

(*)  /Unity/.gitignore

[Add new .gitignore]

In any case, clicking the pushbutton would expand out the list into the
longer form above and then you could go from there.

-Mike


On Thu, Mar 26, 2015 at 7:34 AM, [hidden email] [smartgit] <
[hidden email]> wrote:

>
>
> In our company we only use .gitignore in the root which means we are not
> using SmartGit ignore feature We manually modify the .gitignore in that
> effect.
>  
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFE: where do you prefer .gitignore files to be located/created

SmartGit mailing list
> So, for an Ignore UI to be useful to me, I'd need a way to choose which
> .gitignore to use. Here's how I would probably do it:

I like this idea. For the main use case where there is exactly one .gitignore in the root directory, I think the Ignore dialog should be kept as simple as it currently is (no additional buttons). In all other cases, some kind of selector would be displayed. I'm not sure whether the "create new .gitignore" option should actually be present: it's a quite advanced feature which makes the whole workflow more complex and on the other hand could be easily worked around by adding an (untracked) .gitignore file manually.

--
Best regards,
Marc Strapetz
syntevo GmbH
http://www.syntevo.com


03/27/2015 03:10 - Michael Geary [hidden email] [smartgit] wrote:

> I use both root and nested .gitignore files in the same repo.
>
> Many of my projects pull in technologies from all across the board, and
> sometimes individual components require different ignore policies. One
> example is a Unity project that ignores .sln  and related files (because
> they are generated by the Visual Studio Unity tools) but also has a nested
> Helpers directory containing other .sln files for C#/C++ projects that *do*
> need to be checked in. (I didn't choose the directory structure!)
>
> We could probably fit all these rules into a single root .gitignore, but it
> was cleaner to give Helpers a .gitignore file of its own.
>
> So, for an Ignore UI to be useful to me, I'd need a way to choose which
> .gitignore to use. Here's how I would probably do it:
>
> Add a new panel to the bottom of the Ignore dialog, displaying a list of
> nested directories starting from the current file's directory and working
> down to the repo root. Each directory in the list has either a radio button
> to allow it to be selected, or a "Create new .gitignore here" pushbutton,
> depending on whether it already has a .gitignore file. Clicking that Create
> button adds a radio button to that same directory and selects it. (The
> purpose of this extra step is to help avoid accidentally creating a
> .gitignore when you're more likely to want to add to an existing one.)
>
> In my example, let's say the repo is in /Unity and we are looking at a file
> in /Unity/Helpers/Source. The Source directory does not have a .gitignore
> but both parents do, so the dialog panel would look something like this:
>
>      /Unity/Helpers/Source  [Create new .gitignore here]
> ( )  /Unity/Helpers/.gitignore
> (*)  /Unity/.gitignore
>
> If a repo has only a single .gitignore (the most common case), select it by
> default. If there's more than one, as above, the default could be either
> the first or last one in the list, but if the user selects a different one
> it would be nice to remember that selection for the next time the dialog is
> used.
>
> If you clicked the "Create..." pushbutton in this example, the display
> would change to:
>
> (*)  /Unity/Helpers/Source
> ( )  /Unity/Helpers/.gitignore
> ( )  /Unity/.gitignore
>
> Actually you wouldn't *create* that new .gitignore quite yet; you'd wait
> and create it if the user actually clicks OK on the entire dialog.
>
> A way to simplify the default presentation a bit could work like this:
> Initially, the directory list shows only directories that already have a
> .gitignore file, and there would be a single Add new .gitignore pushbutton
> below the list:
>
> ( )  /Unity/Helpers/.gitignore
> (*)  /Unity/.gitignore
>
> [Add new .gitignore]
>
> This would be nice for the common case of a single .gitignore since it
> would be the only thing in the list:
>
> (*)  /Unity/.gitignore
>
> [Add new .gitignore]
>
> In any case, clicking the pushbutton would expand out the list into the
> longer form above and then you could go from there.
>
> -Mike
>
>
> On Thu, Mar 26, 2015 at 7:34 AM, [hidden email] [smartgit] <
> [hidden email]> wrote:
>
> >
> >
> > In our company we only use .gitignore in the root which means we are not
> > using SmartGit ignore feature We manually modify the .gitignore in that
> > effect.
> >  
> >
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFE: where do you prefer .gitignore files to be located/created

SmartGit mailing list
I actually really like Michael's suggestion as he presented it, simple
dialogue but option to become more complicated. I don't think this is
necessarily advanced (though complicated dialogues tend to not scare me I
suppose). My only issue is that the gui is supposed to abstract from the
underlying system. So instead of "add new .gitignore" annd having to think
about what that entails, perhaps the question should simply be something
clearer/more abstracted like "from which directory would you like this
ignore to be applied" is perhaps best where by default only root is shown
and then a selector can be expanded. No need for a add .gitignore button,
that is for the gui to do under the hood is needed.

Best,
Dee

On Fri, Mar 27, 2015 at 9:53 AM, syntevo Support [hidden email]
[smartgit] <[hidden email]> wrote:

>
>
> > So, for an Ignore UI to be useful to me, I'd need a way to choose which
> > .gitignore to use. Here's how I would probably do it:
>
> I like this idea. For the main use case where there is exactly one
> .gitignore in the root directory, I think the Ignore dialog should be kept
> as simple as it currently is (no additional buttons). In all other cases,
> some kind of selector would be displayed. I'm not sure whether the "create
> new .gitignore" option should actually be present: it's a quite advanced
> feature which makes the whole workflow more complex and on the other hand
> could be easily worked around by adding an (untracked) .gitignore file
> manually.
>
> --
> Best regards,
> Marc Strapetz
> syntevo GmbH
> http://www.syntevo.com
>
> 03/27/2015 03:10 - Michael Geary [hidden email] [smartgit] wrote:
>
> > I use both root and nested .gitignore files in the same repo.
> >
> > Many of my projects pull in technologies from all across the board, and
> > sometimes individual components require different ignore policies. One
> > example is a Unity project that ignores .sln and related files (because
> > they are generated by the Visual Studio Unity tools) but also has a
> nested
> > Helpers directory containing other .sln files for C#/C++ projects that
> *do*
>
> > need to be checked in. (I didn't choose the directory structure!)
> >
> > We could probably fit all these rules into a single root .gitignore, but
> it
> > was cleaner to give Helpers a .gitignore file of its own.
> >
> > So, for an Ignore UI to be useful to me, I'd need a way to choose which
> > .gitignore to use. Here's how I would probably do it:
> >
> > Add a new panel to the bottom of the Ignore dialog, displaying a list of
> > nested directories starting from the current file's directory and working
> > down to the repo root. Each directory in the list has either a radio
> button
> > to allow it to be selected, or a "Create new .gitignore here" pushbutton,
> > depending on whether it already has a .gitignore file. Clicking that
> Create
> > button adds a radio button to that same directory and selects it. (The
> > purpose of this extra step is to help avoid accidentally creating a
> > .gitignore when you're more likely to want to add to an existing one.)
> >
> > In my example, let's say the repo is in /Unity and we are looking at a
> file
> > in /Unity/Helpers/Source. The Source directory does not have a .gitignore
> > but both parents do, so the dialog panel would look something like this:
> >
> > /Unity/Helpers/Source [Create new .gitignore here]
> > ( ) /Unity/Helpers/.gitignore
> > (*) /Unity/.gitignore
> >
> > If a repo has only a single .gitignore (the most common case), select it
> by
> > default. If there's more than one, as above, the default could be either
> > the first or last one in the list, but if the user selects a different
> one
> > it would be nice to remember that selection for the next time the dialog
> is
> > used.
> >
> > If you clicked the "Create..." pushbutton in this example, the display
> > would change to:
> >
> > (*) /Unity/Helpers/Source
> > ( ) /Unity/Helpers/.gitignore
> > ( ) /Unity/.gitignore
> >
> > Actually you wouldn't *create* that new .gitignore quite yet; you'd wait
> > and create it if the user actually clicks OK on the entire dialog.
> >
> > A way to simplify the default presentation a bit could work like this:
> > Initially, the directory list shows only directories that already have a
> > .gitignore file, and there would be a single Add new .gitignore
> pushbutton
> > below the list:
> >
> > ( ) /Unity/Helpers/.gitignore
> > (*) /Unity/.gitignore
> >
> > [Add new .gitignore]
> >
> > This would be nice for the common case of a single .gitignore since it
> > would be the only thing in the list:
> >
> > (*) /Unity/.gitignore
> >
> > [Add new .gitignore]
> >
> > In any case, clicking the pushbutton would expand out the list into the
> > longer form above and then you could go from there.
> >
> > -Mike
> >
> >
> > On Thu, Mar 26, 2015 at 7:34 AM, [hidden email] [smartgit]
> <
> > [hidden email]> wrote:
> >
> > >
> > >
> > > In our company we only use .gitignore in the root which means we are
> not
> > > using SmartGit ignore feature We manually modify the .gitignore in that
> > > effect.
> > >
> > >
> >
>
>  
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFE: where do you prefer .gitignore files to be located/created

SmartGit mailing list
In reply to this post by SmartGit mailing list
.gitignore at root, exclusively :)



On Fri, Mar 27, 2015 at 1:53 AM syntevo Support [hidden email]
[smartgit] <[hidden email]> wrote:

> > So, for an Ignore UI to be useful to me, I'd need a way to choose which
> > .gitignore to use. Here's how I would probably do it:
>
> I like this idea. For the main use case where there is exactly one
> .gitignore in the root directory, I think the Ignore dialog should be kept
> as simple as it currently is (no additional buttons). In all other cases,
> some kind of selector would be displayed. I'm not sure whether the "create
> new .gitignore" option should actually be present: it's a quite advanced
> feature which makes the whole workflow more complex and on the other hand
> could be easily worked around by adding an (untracked) .gitignore file
> manually.
>
>
>
> --
> Best regards,
> Marc Strapetz
>
> syntevo GmbH
> http://www.syntevo.com
>
>
>
> 03/27/2015 03:10 - Michael Geary [hidden email] [smartgit] wrote:
>
> > I use both root and nested .gitignore files in the same repo.
> >
> > Many of my projects pull in technologies from all across the board, and
> > sometimes individual components require different ignore policies. One
> > example is a Unity project that ignores .sln and related files (because
> > they are generated by the Visual Studio Unity tools) but also has a
> nested
>
> > Helpers directory containing other .sln files for C#/C++ projects that
> *do*
>
>
> > need to be checked in. (I didn't choose the directory structure!)
> >
> > We could probably fit all these rules into a single root .gitignore, but
> it
> > was cleaner to give Helpers a .gitignore file of its own.
> >
> > So, for an Ignore UI to be useful to me, I'd need a way to choose which
> > .gitignore to use. Here's how I would probably do it:
> >
> > Add a new panel to the bottom of the Ignore dialog, displaying a list of
> > nested directories starting from the current file's directory and working
> > down to the repo root. Each directory in the list has either a radio
> button
> > to allow it to be selected, or a "Create new .gitignore here" pushbutton,
> > depending on whether it already has a .gitignore file. Clicking that
> Create
> > button adds a radio button to that same directory and selects it. (The
> > purpose of this extra step is to help avoid accidentally creating a
> > .gitignore when you're more likely to want to add to an existing one.)
> >
> > In my example, let's say the repo is in /Unity and we are looking at a
> file
> > in /Unity/Helpers/Source. The Source directory does not have a .gitignore
> > but both parents do, so the dialog panel would look something like this:
> >
> > /Unity/Helpers/Source [Create new .gitignore here]
> > ( ) /Unity/Helpers/.gitignore
> > (*) /Unity/.gitignore
> >
> > If a repo has only a single .gitignore (the most common case), select it
> by
> > default. If there's more than one, as above, the default could be either
> > the first or last one in the list, but if the user selects a different
> one
> > it would be nice to remember that selection for the next time the dialog
> is
> > used.
> >
> > If you clicked the "Create..." pushbutton in this example, the display
> > would change to:
> >
> > (*) /Unity/Helpers/Source
> > ( ) /Unity/Helpers/.gitignore
> > ( ) /Unity/.gitignore
> >
>
> > Actually you wouldn't *create* that new .gitignore quite yet; you'd wait
>
>
> > and create it if the user actually clicks OK on the entire dialog.
> >
> > A way to simplify the default presentation a bit could work like this:
> > Initially, the directory list shows only directories that already have a
> > .gitignore file, and there would be a single Add new .gitignore
> pushbutton
> > below the list:
> >
> > ( ) /Unity/Helpers/.gitignore
> > (*) /Unity/.gitignore
> >
> > [Add new .gitignore]
> >
> > This would be nice for the common case of a single .gitignore since it
> > would be the only thing in the list:
> >
> > (*) /Unity/.gitignore
> >
> > [Add new .gitignore]
> >
> > In any case, clicking the pushbutton would expand out the list into the
> > longer form above and then you could go from there.
> >
> > -Mike
> >
> >
> > On Thu, Mar 26, 2015 at 7:34 AM, [hidden email] [smartgit]
> <
> > [hidden email]> wrote:
> >
> > >
> > >
> > > In our company we only use .gitignore in the root which means we are
> not
> > > using SmartGit ignore feature We manually modify the .gitignore in that
> > > effect.
> > >
> > >
> >
>
>  
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFE: where do you prefer .gitignore files to be located/created

SmartGit mailing list
We plan to add a combobox to the dialog containing the parents up to the repository's root directory. If up to this root a .gitignore file was found, this path will be preselected, otherwise the root will be preselected.

--
Best regards,
Thomas Singer
syntevo GmbH
http://www.syntevo.com


03/27/2015 22:40 - Ben Vesco [hidden email] [smartgit] wrote:

> .gitignore at root, exclusively :)
>
>
>
> On Fri, Mar 27, 2015 at 1:53 AM syntevo Support [hidden email]
> [smartgit] <[hidden email]> wrote:
>
> > > So, for an Ignore UI to be useful to me, I'd need a way to choose which
> > > .gitignore to use. Here's how I would probably do it:
> >
> > I like this idea. For the main use case where there is exactly one
> > .gitignore in the root directory, I think the Ignore dialog should be kept
> > as simple as it currently is (no additional buttons). In all other cases,
> > some kind of selector would be displayed. I'm not sure whether the "create
> > new .gitignore" option should actually be present: it's a quite advanced
> > feature which makes the whole workflow more complex and on the other hand
> > could be easily worked around by adding an (untracked) .gitignore file
> > manually.
> >
> >
> >
> > --
> > Best regards,
> > Marc Strapetz
> >
> > syntevo GmbH
> > http://www.syntevo.com
> >
> >
> >
> > 03/27/2015 03:10 - Michael Geary [hidden email] [smartgit] wrote:
> >
> > > I use both root and nested .gitignore files in the same repo.
> > >
> > > Many of my projects pull in technologies from all across the board, and
> > > sometimes individual components require different ignore policies. One
> > > example is a Unity project that ignores .sln and related files (because
> > > they are generated by the Visual Studio Unity tools) but also has a
> > nested
> >
> > > Helpers directory containing other .sln files for C#/C++ projects that
> > *do*
> >
> >
> > > need to be checked in. (I didn't choose the directory structure!)
> > >
> > > We could probably fit all these rules into a single root .gitignore, but
> > it
> > > was cleaner to give Helpers a .gitignore file of its own.
> > >
> > > So, for an Ignore UI to be useful to me, I'd need a way to choose which
> > > .gitignore to use. Here's how I would probably do it:
> > >
> > > Add a new panel to the bottom of the Ignore dialog, displaying a list of
> > > nested directories starting from the current file's directory and working
> > > down to the repo root. Each directory in the list has either a radio
> > button
> > > to allow it to be selected, or a "Create new .gitignore here" pushbutton,
> > > depending on whether it already has a .gitignore file. Clicking that
> > Create
> > > button adds a radio button to that same directory and selects it. (The
> > > purpose of this extra step is to help avoid accidentally creating a
> > > .gitignore when you're more likely to want to add to an existing one.)
> > >
> > > In my example, let's say the repo is in /Unity and we are looking at a
> > file
> > > in /Unity/Helpers/Source. The Source directory does not have a .gitignore
> > > but both parents do, so the dialog panel would look something like this:
> > >
> > > /Unity/Helpers/Source [Create new .gitignore here]
> > > ( ) /Unity/Helpers/.gitignore
> > > (*) /Unity/.gitignore
> > >
> > > If a repo has only a single .gitignore (the most common case), select it
> > by
> > > default. If there's more than one, as above, the default could be either
> > > the first or last one in the list, but if the user selects a different
> > one
> > > it would be nice to remember that selection for the next time the dialog
> > is
> > > used.
> > >
> > > If you clicked the "Create..." pushbutton in this example, the display
> > > would change to:
> > >
> > > (*) /Unity/Helpers/Source
> > > ( ) /Unity/Helpers/.gitignore
> > > ( ) /Unity/.gitignore
> > >
> >
> > > Actually you wouldn't *create* that new .gitignore quite yet; you'd wait
> >
> >
> > > and create it if the user actually clicks OK on the entire dialog.
> > >
> > > A way to simplify the default presentation a bit could work like this:
> > > Initially, the directory list shows only directories that already have a
> > > .gitignore file, and there would be a single Add new .gitignore
> > pushbutton
> > > below the list:
> > >
> > > ( ) /Unity/Helpers/.gitignore
> > > (*) /Unity/.gitignore
> > >
> > > [Add new .gitignore]
> > >
> > > This would be nice for the common case of a single .gitignore since it
> > > would be the only thing in the list:
> > >
> > > (*) /Unity/.gitignore
> > >
> > > [Add new .gitignore]
> > >
> > > In any case, clicking the pushbutton would expand out the list into the
> > > longer form above and then you could go from there.
> > >
> > > -Mike
> > >
> > >
> > > On Thu, Mar 26, 2015 at 7:34 AM, [hidden email] [smartgit]
> > <
> > > [hidden email]> wrote:
> > >
> > > >
> > > >
> > > > In our company we only use .gitignore in the root which means we are
> > not
> > > > using SmartGit ignore feature We manually modify the .gitignore in that
> > > > effect.
> > > >
> > > >
> > >
> >
> >  
> >
>
Loading...