-
Notifications
You must be signed in to change notification settings - Fork 12
Using Git
Git is a version control system, which means that is is used to maintain a complete history of a project so that at any time, one can "roll back" or restore their code to a specific version. Though one can maintain a local git repository, it is a lot more useful to keep the repository online so that it can serve as a backup and also be used by multiple members on a team to collaborate. This is the reason all of our course codebase is hosted on GitHub, in order to make it easier to have everyone have access to the same codebase.
While it might seem a little frustrating to learn Git usage in the context of this course, version control is used in some form in almost any industry or academic work where software development or configuration management is a major component. It is an extremely good idea to have a basic understanding of Git in order to be ready for any team effort.
NOTE: The instructions below are for Linux and Mac OS X. A Windows guide will be posted shortly.
To use a git repository such as this one (EL6483_EmbeddedSystems), one must first "clone" a copy onto their own computer. To do this, you must have the "git" client installed. In the case of most popular Linux distributions, one simply needs to install the "git" package through their package manager. For example, those using Ubuntu or Debian can usually just type:
sudo apt-get install git
For Mac OS X, the git client should be installed automatically if you have installed Developer Tools on your machine. Typically, Developer Tools is available by download from Apple, so you should see Apple's support website to find a download link. An alternative and recommended install of Git is from https://git-scm.com/downloads. This link provides a more up-to-date version of Git that will likely have fewer bugs, and it comes directly from the Git website.
Okay, so now you've installed Git... Next, type the following to clone the course Git repository:
git clone https://github.com/Aghosh993/EL6483_EmbeddedSystems.git
After a few seconds, the command should complete and result in there being an "EL6483_EmbeddedSystems" directory within your current directory.
At any time, if you are trying to pull the latest copy of the repository, make sure you are within the "EL6483_EmbeddedSystems" directory mentioned above by typing:
cd [PATH]/EL6483_EmbeddedSystems
where [PATH] must be replaced by the actual path to the directory where you cloned the repository. So, for example, if you cloned the repository into your home directory for username "user" on Ubuntu, the above command would be re-written as:
cd /home/user/EL6483_EmbeddedSystems
Once you're in the EL6483_EmbeddedSystems directory, type:
git pull
Assuming you haven't made any local changes yourself to any of the files that came from the repository, git should now update your copy of the repository to the latest working copy, complete with any updates I have uploaded. Please note: NONE of your LOCAL work (i.e. any folders you made by running the mkproject.sh scripts) will be changed, as all of those files are UNTRACKED and therefore invisible to Git!!
(c) Abhimanyu Ghosh, 2017. Distribution (in exact/modified form) permitted as long as a link is provided to this page.