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
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>
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:
Code: Select all
git add *
git commit -m "<date>"
git push
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.