Closed skwde closed 1 year ago
Have you tried yadm add -u
? That will add any files already tracked.
Yes it almost does what I want. However it is missing the 'track entire (sub)directory'.
How do I have entire subdirectories like e.g. ~/.vim/
tracked?
you would track the folder with add ~/.vim/*
Hmm, this does not work. Try
yadm status # says nothing to commit
yadm add ~/.vim/*
touch ~/.vim/test.file
yadm status # says nothing to commit
Note, my whole point is to avoid having to add files in a folder which I want to have tracked (here ~/.vim/
) manually whenever I add a new file to the folder in question.
thing is git wont track a folder with nothing in it if there is nothing there there is nothing to track and track changes.
also it wont track "folders". git only tracks files. they have to be there for git to track them but once you've made them you can track them like that
huh, this wouldn't do quite what you want, and it doesn't actually work, but I'm not sure why, it just hangs
yadm gitconfig "alias.all" '!yadm add -u; yadm add'
yadm all ~/.foo
to be honest though, I'm not entirely certain why that's not a git command already, might be worth asking git to add a -U --update-and-add-path
for this, because it seems strange that you can't do that right now (that I can see, in porcelain)
Hmm, this does not work. Try
yadm status # says nothing to commit yadm add ~/.vim/* touch ~/.vim/test.file yadm status # says nothing to commit
Note, my whole point is to avoid having to add files in a folder which I want to have tracked (here
~/.vim/
) manually whenever I add a new file to the folder in question.thing is git wont track a folder with nothing in it if there is nothing there there is nothing to track and track changes.
In my case, I want to yadm add ~/.config/fish
, then when I define new aliases in the directory, I want them to be picked up as untracked files (but new files in other directories are ignored). A standalone Git repository shows the following when I run git status
:
Untracked files:
(use "git add <file>..." to include in what will be committed)
asdf
But if I touch ~/.config/fish/asdf
, then yadm status
shows nothing to commit (use -u to show untracked files)
. And if I run yadm status -u
, it hangs trying to list all files in my home directory.
Is there a way to opt specific directories into "show untracked files", so newly created files in ~/config/fish/
(or ~/.vim/) are shown in
yadm status, but not newly created files in
~/Downloads/`?
This issue has been labeled as stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
In my case, I added an alias/function yadm-add
:
yadm add -u
yadm add ~/.config/fish
yadm add ~/path
Nonetheless I still think "adding a folder to yadm" is an important missing feature (yadm add -u
only updates existing files not folders, and yadm add -A
adds your entire homedir).
This issue has been labeled as stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue is still a concern.
This issue has been labeled as stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
Still interested in this.
poke
This issue has been labeled as stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
i don't care anymore. you win, stalebot.
This issue has been labeled as stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been labeled as stale for 7 days with no activity.
Maybe this could be achieved with submodules?
I strive to keep the interface of yadm inline with that of Git. This helps in two ways. First, yadm is a wrapper around Git, and any new features, updated interface, etc. simply join the party without any effort. Second, it allows users to intuitively understand what yadm will do. The more things that yadm does differently the more confusing it can be.
Those that would like yadm to be able to track directories (in a way that Git does not) can add an alias which adds those directories.
Is your feature request related to a problem? Please describe.
yadm add -A
adds all files in$HOME
. Thus one always has to explicitly doyadm add <changed file(s)>
This is rather inconvenient and involves a lot of typing.Describe the solution you'd like
yadm
keeps track of the files or entire folders already added to the repository. We can already show the filesyadm
keeps track of viayadm list
, this however only shows files. (And doesn't care if one didyadm add <some dir>
) It would be nice ifyadm add <some file or dir>
writes this (<some file or dir>
) also to a file when first, e.g.~/.config/yadm/track
when first added. Thenyadm add -A
is remapped to something likeyadm add $(cat ~/.config/yadm/track)
.Or if this is not possible because
add
comes fromgit
, a new command something likeyadm all
would be a viable option I think.Describe alternatives you've considered
I defined a wrapper function
and keep
~/.config/yadm/track
up to date myself.