Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotfiles cli should follow a git push and git pull style #51

Open
mayuroks opened this issue Mar 5, 2015 · 6 comments
Open

dotfiles cli should follow a git push and git pull style #51

mayuroks opened this issue Mar 5, 2015 · 6 comments

Comments

@mayuroks
Copy link

mayuroks commented Mar 5, 2015

After adding dotfiles, doing this is kinda over head

$ cd ~/Dotfiles
$ git add vimrc
$ git commit -m "Added vimrc, welcome aboard!"
$ git push
# Proposed Add behaviour
$ dotfiles -a => should also do git add that file

# Proposed Sync behaviour
$ dotfiles -s => sync from local dotfiles dir
$ dotfiles -s --git-pull => pull from github to local dotfiles dir and then SYNC
$ dotfiles -s --git-pull-push => pull && push to local dotfiles dir and then SYNC to github 
@jbernard
Copy link
Owner

jbernard commented Mar 6, 2015

You raise a good point.

The original intent was to be vcs-agnostic and allow the user to back the repo with whatever they choose and manage it with the native tools. The main argument is that dotfiles would have to make distinct choices about which vcs to support and how changes would be made (commit messages, merge strategy, conflict resolution, etc) - and not everyone will agree with those choices.

But I recently found pass (http://www.passwordstore.org/) and they handle this in a very clean way - the directory is just a password store - unless a .git directory is found, and then vcs commands are issued to keep the repository in sync. If it's done in a modular way, such that git is not a strict dependency, then I think it would be cool.

@drozdziak1
Copy link

I think that the VCS-agnostic approach could be somewhat preserved if you had implemented some kind of VCS profiles for some other popular systems of that kind.

When talking about Git, I'd make Dotfiles only do anything remote-related on --sync when some additional, let's say, --remote <remote name, origin by default> <branch name, current branch by default> flag is added. On such occasion, Dotfiles could do a simple git status, and if there's nothing to track/commit, it would fire up a git pull <remote name> <branch> and then (after asking the user to approve of the present state of their files) push the repo back with the new stuff. Anything else (merges, commits, adding files for staging, conflict resolving) the user can do without unnecessarily involving the script, i.e. using their existing git configuration.

@prologic
Copy link

I would like this too!

@jbernard
Copy link
Owner

Ok, I'll see what I can do. I'm in the middle of some rather large rework and will keep this in mind as things progress.

@prologic
Copy link

👍

James Mills / prologic

E: [email protected]
W: prologic.shortcircuit.net.au

On Thu, Jan 14, 2016 at 4:40 AM, Jon Bernard [email protected]
wrote:

Ok, I'll see what I can do. I'm in the middle of some rather large rework
and will keep this in mind as things progress.


Reply to this email directly or view it on GitHub
#51 (comment).

@cnadiminti
Copy link

I think it should be VCS agnostic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants