lilymaya.github.io

View on GitHub

Biology 824 Assignment Week 3- Version Control with Git and Github


Here are some FAQs about Github!

When should you use Git for a project?

Github is a version control system. This has a number of awesome benefits for your project!

Github is great for solo workers and big teams- both will benefit from the tracked changes, and the team will benefit from easy collaboration!


What kind of files/info should be saved in a Git repository? What types of files/info should not be included in a Git repo?

Github is great for:

However, Github cannot store large files, such as a huge dataset. Also, don’t forget that if your Github is public, do not store any private information as it will be accessible by anyone.


What are the commands to undo a commit?

To go back to a previous version of a file, you can use git checkout This restores the previous version of the file. You can simply type git checkout HEAD~1 [yourfile] to go back one step. Alternatively, you can enter a specific version of a file (perhaps a few steps back) to revert back, for example: git checkout [myoldversion]

Alternatively, you can use git revert [IDofyourincorrectcommit] However, this will make a new commit to undo your old one. It will not be the same as deleting your old commit.


One of your repositories is in a “detached HEAD” state. How do you fix this?

A detached headspace can happen if you hit the command checkout without specifying where to go. You must re-attach your head before making any more changes. To do this you can simply type: git checkout master


Your boss has no idea what Git is or why you are using it. Explain the pros / cons of using Git for your research project. Explain the pros / cons of hosting your project in a public (or private) repository on Github/Bitbucket/Gitlab/etc.

Pros

Cons