GITHUB

Dr. Ajay Kumar Koli (PhD) ⋅ SARA Institute of Data Science, India

Track Changes in MS Word

😢

Version Control


Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later. (Atlassian 2025)

Version control is like a time machine for your files. It keeps track of all the changes made to your documents, code, or any other files over time. (Le Chat)

😍 Why use Version Control?

  1. Avoid Losing Work:
    • Ever accidentally deleted something important? With version control, you can easily recover previous versions of your files.
  2. Collaborate Easily:
    • Working with a team? Version control allows multiple people to work on the same project without overwriting each other’s changes.
  3. Track Changes:
    • Know exactly who made what changes and when. This is especially useful for keeping track of progress and identifying issues.
  4. Experiment Safely:
    • Want to try something new without risking your current work? Version control lets you create branches to experiment with new ideas. If it doesn’t work out, you can always go back to the original version.

Tracking + Version in Google Docs

Work Journey is Less Painful with Version Control

Git

GitHub

RStudio

Git

  • It is a free and open-source distributed version control system (Git Official Webpage, n.d.).

Image Source: Chacon and Straub (2014)

Install Git

Webpage: https://gitforwindows.org/

Install Git

Open Terminal git --version

GitHub

Official Website: https://github.com/

GitHub


A platform for hosting and collaborating on Git repositories.


Source Website: https://github.com/about

GitHub Sign up

  • Username advice
    • all small cases
    • use hyphen - to separate the words
    • the shorter the better
    • make it timeless (do not ajay-jnu, ajay-ny, ajay-microsoft)
    • avoid special characters
    • reuse from your social media
    • comfortable to reveal to the world

GitHub Settings

Enable Two Factor Authentication

Enable Two Factor Authentication

RStudio → Tools → Global Options → Git/SVN

Save GitHub Username in RStudio

  • Using Console, Install R package usethis
## install if needed (do this exactly once):
## install.packages("usethis")

library(usethis)
use_git_config(user.name = "ajay-kolii",
               user.email = "mynameajay@gmail.com")
  • To See Saved Credentials, Run in Terminal
    git config --global --list

Read more here: https://usethis.r-lib.org/articles/git-credentials.html

GitHub’s Personal Access Token (PAT)


It is a way to authenticate and interact with GitHub’s API and repositories without using your username and password.

Create GitHub’s PAT in Console

library(gitcreds)
create_github_token()


Personal Access Token (PAT)

Personal Access Token (PAT)

Add PAT

gitcreds_set()


View GitHub Credentials

gitcreds_get()


  • To See Saved Credentials, Run in Terminal
    git config --global --list

References

Atlassian. 2025. “Learn Git - Tutorials, Workflows and Commands.” https://www.atlassian.com/git.
Chacon, Scott, and Ben Straub. 2014. Pro Git. 2nd ed. edition. New York, NY: Apress.
Git Official Webpage. n.d. “Git.” https://git-scm.com/.
1 / 26
GITHUB Dr. Ajay Kumar Koli (PhD) ⋅ SARA Institute of Data Science, India

  1. Slides

  2. Tools

  3. Close
  • GITHUB
  • Track Changes in MS Word
  • 😢
  • Version Control
  • 😍 Why use Version Control?
  • Tracking + Version in Google Docs
  • Work Journey is Less Painful with Version Control
  • Git
  • Install Git
  • Install Git
  • Open Terminal git --version
  • GitHub
  • GitHub
  • GitHub Sign up
  • GitHub Settings
  • Enable Two Factor Authentication
  • Enable Two Factor Authentication
  • RStudio \(\rightarrow\) Tools \(\rightarrow\) Global Options \(\rightarrow\) Git/SVN
  • Save GitHub Username in RStudio
  • GitHub’s Personal Access Token (PAT)
  • Create GitHub’s PAT in Console
  • Personal Access Token (PAT)
  • Personal Access Token (PAT)
  • Add PAT
  • View GitHub Credentials
  • References
  • f Fullscreen
  • s Speaker View
  • o Slide Overview
  • e PDF Export Mode
  • r Scroll View Mode
  • ? Keyboard Help