Do I need to use git from the commmand line?
Absolutely not! You can use the git GUI in windows or tortoise tools - see:
Can I use git in Rstudio?
Yes you can! See git in Rstudio
Can I use github for storing computer code for referencing in journals?
Yes. In most cases you will need to generate a Zenodo code (DOI) for a specific github commit. This takes a snap shot of the repo and archives it at that point. You also get a nice Zenodo badge to tag on to that commit point, and I'd recommend tagging it with a version number which you can refer to in the paper.
Which should I use, gitHub or gitLab?
Either is fine. At the moment gitLab is less faff because you can simply use your BioSS login whereas for github you need to get a personal access token. Both can be kept private or open.
If I am using externally-owned confidential data, should I include it in my gitLab repository for the project?
No, don't put this on gitLab. You can keep it locally in your folder with code that is on gitLab but just don't add/commit the data set.
How do I exit the vim editor?
Simply type
:q
i.e. type a colon and then the letter q. If you've made changes you need to either use :wq to save and exit or :q! to discard the changes