

#to get git to start tracking the changes in the newly added files use the following commandĪs mentioned above, is an awesome site to learn more about Git. For windows, there are lots of clients available, however in my view, Sourcetree is one of the best (more about this abit later).įor MacBook users, below are some basic commands you can use from a terminal session #change to directory where you will store your repositoryĬd /Users/tomj/Documents/git-repo/personalproject To use Git, you need to use a Git client. If you have a MacBook, a git client comes built-in. For my personal projects, I use a Dropbox synchronised folder. You can also use Github, however, your repositories will be public, unless you sign up for a paid account.įor personal use, you can store your git repositories in a local directory that is backed up to the cloud. To host the repositories for your team, two commonly used solutions are a Git Server or Visual Studio Teams Server. If you want to read more on git, check out The team member then can either resolve the conflicts and then re-merge or discard their changes altogether. However, if there are conflicts, Git will inform that team member, showing them the conflicts.
#Using sourcetree to backup my projects update
If there are no conflicts, Git will update the files in its repository. They can also branch a part of the repository, update the files in that part and then merge them with the master. Team members can pull the repository to their local computer. When working in a team, it allows you to have your files centrally managed, and at the same time, allowing multiple people to work on them.

Git is an awesome opensource distributed version control system.
#Using sourcetree to backup my projects free
We will also use Sourcetree, Atlassian’s free Git client.

Please ensure that the local folder you are tracking for source control is backed up either to the cloud or to an external hard disk.įor editing our code/script, we will use Microsoft’s Visual Studio Code, a free IDE that has Git support in-built. In these situations, a Git Server is used to store the repository. The main use of Git is for source control of files that a team contributes to. In this blog I will show you how you can use Git, an open source version control system, to track changes to scripts stored locally on your computer. Guess what! I think I just found this golden goose and it is truly amazing! One that will show me the changes I had made, and which will allow me to easily revert to a previous version. This is why I started my search for a better change tracking system. The only version to revert to was the original, which meant all my hard work went to waste! Guess what, these are the times when I found I made the worst mistakes! I used to get so engrossed with my modifications that I would forget to make a backup of the changes and end up with an unworkable script. However, there were instances when I was making backups of the modified script because I had tested a modification and it worked, however I didn’t want to risk breaking it when further modifying the file. This provided me with a timestamp of when I changed the file and a way of reverting my changes. To make a copy of a script, I would normally suffix the file with the current time and date. Ok, time to fess up 😉 Hands up those that have modified a script, only to realise that the modifications broke it! To make matters worse, you forgot to take a copy of the original!ĭon’t worry, I have been in that boat, and can remember the countless hours I spent, getting the script back to what it was (mind you, I am not talking about a formal business change here, which is governed by strict change control, but about personal scripts, that you have created to make your daily tasks easier) However, writing scripts brings about its own challenges. Whenever I saw repeatable tasks, I saw an opportunity to script them, and pass them onto a junior to do 😉 Coming from a system administration background, I am used to writing scripts to get mundane tasks done.
