Data Science for Bioinformatics Student ID: 21485094
Beatriz Manso
GIT – VERSION CONTROL
1. How do you determine which version of git is installed on your system and how
do you install git on your operating system?
How to verify if Git is installed and which version it is:
If it is not installed, we can do that by going on the command line and writing the following
commands:
- For LINUX:
sudo apt-get update
sudo apt-get install git
- For WINDOWS:
https://gitforwindows.org/
2. How to configure your git environment?
Configurations such as Name, Email, Default editor and Line ending need to be set.
The following configuration levels are available:
--local
By default, git config will write to a local level if no configuration option is passed. Local
level configuration is applied to the context repository git config gets invoked in. Local
configuration values are stored in a file that can be found in the repo's .git directory:
.git/config.
--global
Global level configuration is user-specific, meaning it is applied to an operating system
user. Global configuration values are stored in a file that is located in a user's home
directory. ~ /.gitconfig on unix systems and C:\Users\\.gitconfig on windows
Data Science for Bioinformatics Student ID: 21485094
Beatriz Manso
--system
System-level configuration is applied across an entire machine. This covers all users
on an operating system and all repos.
My environment is now set:
3. Show how to sign up for a free Github account and set up a Github remote
repository.
Go to github.com website and create a new account by clicking the button ‘Sign Up’ and following
the instructions.
After setting up the account, click on the button ‘New’ to create a new repository.
Data Science for Bioinformatics Student ID: 21485094
Beatriz Manso
4. Create and initialize a local repository in your computer
Clone your newly created repository by copying its HTPPS link:
And paste in GitBash like so:
Working directory holds the actual files.
Index or Staging area is the staging area marking your code changes.
HEAD holds the last commit you have made.
Remote server is the final destination where your code goes, Github.
5. Add the following files FileA.txt, FileB.txt into the created repository.
Data Science for Bioinformatics Student ID: 21485094
Beatriz Manso
6. Make some changes to the newly added files and demonstrate the difference
in their status.
7. Commit the files to the repository and display the history of commits in your
project so far.
8. Demonstrate how to push commits to a remote repository.
9. Demonstrate how to pull the files from a remote repository to a local
repository