-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Use gitSync it's realy easy, you need just to write the url of your repository in the variable $myGit
myGit="https://github.com/myGitID/MyGitRepository.git
Insert this script edited in your .zshrc (it's a file hidden at your directory home). And tip in your shell (replace zsh with the name of your shell):
source ~/.zshrc
Do that after each modification of this script for propagate him.
You can add various orders in sh at execute previous the push for modify or add file(s) in your temporally directory of sync and not pollute your original directory with useless files / modification.
In example .zshrc and .vimrc files of configuration for respectively the shell zsh and the editor vim are copy previous each sync:
previousSync="cp ~/.zshrc ~/ExtSync/;cp ~/.vimrc ~/ExtSync/;git add -f .vimrc .zshrc"
Just edit this variable for add (separate with ";") various orders or delete this default behaviour.
You can modify the paths of directory at synchronize and the name of directory for the temporary clone.
Dir wanted for Sync: dirSync="Sync" Dir target for temporary storage tmpSync="ExtSync"
You can easily repatriate or upgrade your local Sync data with the cmd "gitTake" this commande delete all local data for make a new clean clone.
If you have any problem of merge/pull you can try to resolve this conflict or other in do empty the github repo and repush all with the cmd "gitReset".
You can choose to active the auto synchronizer, the interval of push is defined by the variable interval_auto_sync by default 600 secondes.
For launch autoSync just use the cmd "gitAutoSync".
Enjoy.