Skip to content

ljchueca/BC3-git-workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 

Repository files navigation

BC3-git-workshop

Introduction to GitHub for collaborative projects

a) Install Git on Linux: Debian / Ubuntu (apt-get)

Example

From your terminal, install Git using apt-get:

sudo apt-get update
sudo apt-get install git

Verify the installation was successful by typing:

git --version

Configure your Git username and email using the following commands, replacing Mark's name with your own. These details will be associated with any commits that you create:

git config --global user.name "Mark Zuckerberg"
git config --global user.email "mark.zuckerberg@facebook.com"

b) Install Git on Mac OS X

Example

Install from Homebrew

Open your terminal and install Git using Homebrew:

brew install git

Verify the installation was successful by typing:

git --version

Configure your Git username and email using the following commands, replacing Mark's name with your own. These details will be associated with any commits that you create:

git config --global user.name "Mark Zuckerberg"
git config --global user.email "mark.zuckerberg@facebook.com"

Check if you already have MacPorts installed:

which port

It should returns: /opt/local/bin/port

If not, install it:

sudo port install git

Install from an Installer

(I do not recommend it)

  1. Navigate to the latest macOS Git Installer and download the latest version.

  2. Once the installer has started, follow the instructions as provided until the installation is complete.

  3. Verify the installation was successful by typing:

git --version

c) Install Git on Windows

Example

  1. Navigate to the latest Git for Windows installer and download the latest version.

  2. Once the installer has started, follow the instructions as provided in the Git Setup wizard screen until the installation is complete.

  3. Open the windows command prompt (or Git Bash if you selected not to use the standard Git Windows Command Prompt during the Git installation).

These are my recoomendations, but please, feel free to explore and consider all options:
  - Use bundled OpenSSH
  - Use the OpenSSL library
  - Checkout Windows-style, commit Unix-style line endings
  - Use MinTTY (the default terminal of MSYS2)
  - Fast-forward or merge
  - Git Credential Manager
  - Enable file system caching
  - Override the default branch name for new repositories
  - Git from the command line and also from 3rd-party software
  1. Verify the installation was successful by typing:
git version
  1. Configure your Git username and email using the following commands, replacing Mark's name with your own. These details will be associated with any commits that you create:
git config --global user.name "Mark Zuckerberg"
git config --global user.email "mark.zuckerberg@facebook.com"

Basic commands for git usage:

Git Cheat Sheet

a) Short and concise name

b) Avoid special characters and white spaces

c) Select between public or private

d) Add .gitignoreand select R

e) Edit README

On GitHub repository go to Code -> Copy to clipboard

Link the repository to RStudio / Visual Studio Code / Others

On RStudio:

  • File: New Project: Version Control: Git

  • Paste URL and insert Project directory name

  • Create Project

About

Introduction to GitHub for collaborative projects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published