Consider symlinking the dotfiles (.bashrc , .vimrc ... ) instead of moving them from one place to another, this way if modifications are done on the branch they're automatically updated on HOST.
Reference
Code sample
ln -sv “~/dotfiles/.bash_profile” ~
ln -sv “~/dotfiles/.inputrc” ~
ln -sv “~/dotfiles/.gitconfig” ~
In 🅰️nsible, this will look something like
- name: enable configuration
file: >
dest=/etc/nginx/sites-enabled/default
src=/etc/nginx/sites-available/default
state=link
This symlinks dotfiles from git repo to ~ ($HOME)
Shell commands explained
The above shell commands are explained on explainshell.com
Consider symlinking the dotfiles (
.bashrc,.vimrc... ) instead of moving them from one place to another, this way if modifications are done on the branch they're automatically updated on HOST.Reference
Code sample
In🅰️ nsible, this will look something like
Shell commands explained
The above shell commands are explained on explainshell.com