I created git repo in my tomenet/lib/user/ directory
It allows me to keep records of changes in my macros.
I also cloned it to my second computer. This way I'm keeping my macros synchronized. It'd be nice to integrate git client with tomenet macro menu to allow quick add, commit and push
Git as sync mechanism
Git as sync mechanism
My currently active ToMENet characters:
Slash, Flame, Robber, Missle
Slash, Flame, Robber, Missle
Re: Git as sync mechanism
Interesting idea. I'm not really familiar with git (know that there are loads of open source projects, thats it), how does your stuff looks like?
Tangar's tileset, addon, guides & maps: English TomeNET page ||||||| Russian TomeNet page
http://youtube.com/GameGlaz — streams in English // http://youtube.com/StreamGuild — streams in Russian
My chars @ angband.oook.cz
http://youtube.com/GameGlaz — streams in English // http://youtube.com/StreamGuild — streams in Russian
My chars @ angband.oook.cz
Re: Git as sync mechanism
Lets start with basics. Git is 1 of the most popular VCS (version control system). Its open source, so its free.
To synchronize files I had to set up repository 1st
explanation
git init - initialize local repository here
git remote add <remote name> - set up remote repostory (<remote name> can be anything you like, but 1st remote is commonly named origin)
You can use any git serviceor even your own server to keep your remote. (Bit Bucket/GitHub offer free accounts for public repos)
git add * - all files in this folder will be tracked. (Lazy me. I track more than just macros. You can create .gitignore file to exclude unwanted files)
git commit -m "initial commit" - save state of repository (-m stands for message)
git push -u <remote name> <branch name> - Send your local repository to remote repository that you specified before and create new remote branch. I use only 1 branch and I call it master as it's my main branch. (master is typical name for main branch)
Parameters for push are needed only the first time you push branch to remote repository as you need to create branch there
every time I change something I do that:
Then on my second computer (assuming that I cloned my repository before)
Feel free to ask additional questions. I could not include everything as I use git every day and I used to some things too much.
To synchronize files I had to set up repository 1st
Code: Select all
git init
git remote add <remote name> git@github.com:<user>/<repo_name>.git
git add *
git commit -m "initial commit"
git push -u <remote name> <branch name>
git init - initialize local repository here
git remote add <remote name> - set up remote repostory (<remote name> can be anything you like, but 1st remote is commonly named origin)
You can use any git serviceor even your own server to keep your remote. (Bit Bucket/GitHub offer free accounts for public repos)
git add * - all files in this folder will be tracked. (Lazy me. I track more than just macros. You can create .gitignore file to exclude unwanted files)
git commit -m "initial commit" - save state of repository (-m stands for message)
git push -u <remote name> <branch name> - Send your local repository to remote repository that you specified before and create new remote branch. I use only 1 branch and I call it master as it's my main branch. (master is typical name for main branch)
Parameters for push are needed only the first time you push branch to remote repository as you need to create branch there
every time I change something I do that:
Code: Select all
git add *
git commit -m "<date>"
git push
Code: Select all
git pull
My currently active ToMENet characters:
Slash, Flame, Robber, Missle
Slash, Flame, Robber, Missle
Re: Git as sync mechanism
This is console stuff, so it works only at Linux I assume? Anyway, thanks for info, I'll try it one day!!
Tangar's tileset, addon, guides & maps: English TomeNET page ||||||| Russian TomeNet page
http://youtube.com/GameGlaz — streams in English // http://youtube.com/StreamGuild — streams in Russian
My chars @ angband.oook.cz
http://youtube.com/GameGlaz — streams in English // http://youtube.com/StreamGuild — streams in Russian
My chars @ angband.oook.cz
Re: Git as sync mechanism
it work on windows too
you have nice git on windows program and it work like charm…
my repo with tomenet guide work on windows, for some reasons, but i lazy so i wrote script in python to make commits…
you have nice git on windows program and it work like charm…
my repo with tomenet guide work on windows, for some reasons, but i lazy so i wrote script in python to make commits…
Re: Git as sync mechanism
git is available on windows too.
commands are the same
My currently active ToMENet characters:
Slash, Flame, Robber, Missle
Slash, Flame, Robber, Missle