Introduction to GitHub for collaborative projects
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 "[email protected]"
Example
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 "[email protected]"
Check if you already have MacPorts installed:
which port
It should returns: /opt/local/bin/port
If not, install it:
sudo port install git
(I do not recommend it)
-
Navigate to the latest macOS Git Installer and download the latest version.
-
Once the installer has started, follow the instructions as provided until the installation is complete.
-
Verify the installation was successful by typing:
git --version
Example
-
Navigate to the latest Git for Windows installer and download the latest version.
-
Once the installer has started, follow the instructions as provided in the Git Setup wizard screen until the installation is complete.
-
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
- 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 "[email protected]"
a) Short and concise name
b) Avoid special characters and white spaces
c) Select between public
or private
d) Add .gitignore
and 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 insertProject directory name
-
Create Project