UET Roorkee Students: Using Git and Version Control During a Data Analytics Internship

UET Roorkee Students: Using Git and Version Control During a Data Analytics Internship

Facebook
Twitter
LinkedIn
WhatsApp
Email

Yes, you should use Git from day one of a data analytics internship, and the beginner workflow is small: one repository, one branch per task, short commits, and a push at the end of every working session. It protects your notebooks and SQL from accidental overwrites and gives a mentor or reviewer a readable record of how your analysis developed. This guide gives you a cheat sheet, a branch naming scheme, a sample commit log, a 14-day plan and fixes for the mistakes beginners make most often.

Why analysts need version control more than they expect

Analytics work changes constantly. A cleaning rule is tweaked, a chart is redrawn, a join is rewritten, and a week later nobody remembers which version produced the number in the summary. Naming files final_v3_REAL.ipynb does not solve that. Git does, because every saved state is recorded with a message, a time and an author.

For a short internship, three benefits matter most:

  • Reproducibility: you can return to the exact code that produced a given chart or table.
  • Safe experimentation: you can try a different cleaning approach on a branch without risking your working version.
  • A portfolio artefact: a public repository with a tidy history shows how you work, not only what you produced.

Setting up a repository for an analytics project

Create the repository before you touch any data. A clear folder structure prevents most later confusion.

project-name/
  README.md
  .gitignore
  data/
    raw/          (never edited, usually not committed)
    processed/
  notebooks/
  sql/
  reports/
  requirements.txt

What to commit and what to leave out

Item Commit it? Reason
Python scripts, SQL files Yes Small, text-based, meaningful diffs
Notebooks (.ipynb) Yes, after clearing bulky outputs Outputs inflate the file and make diffs noisy
README and requirements.txt Yes Lets others rerun your work
Large raw datasets No; document the source and download steps Size limits and clutter
Anything containing personal or confidential data Never Cannot be fully removed from history once pushed
API keys, passwords, database credentials Never Public exposure risk
Final charts and the summary report Yes, if small Shows the deliverable next to the code

Add a .gitignore at the start with entries such as the following:

data/raw/
.ipynb_checkpoints/
__pycache__/
.env
*.csv

Free 2-Week CareerSwami Internship

Online, 14 days, with a free offer letter and a free completion certificate once you finish the work. Check with your college that it fits your requirement before you enrol.

Apply for the free internship

Beginner Git cheat sheet for analysts

Goal Command What it does
Start tracking a folder git init Creates a new local repository
Copy an existing repository git clone <url> Downloads it with full history
See what changed git status Lists modified and untracked files
Inspect edits git diff Shows unstaged line changes
Stage files git add sql/clean_orders.sql Marks specific files for the next commit
Save a snapshot git commit -m "message" Records staged changes
Create and switch branch git switch -c analysis/churn-eda Starts an isolated line of work
Switch back git switch main Returns to the main branch
View history git log --oneline Compact list of commits
Upload work git push -u origin analysis/churn-eda Sends the branch to the remote
Get others’ changes git pull Fetches and merges remote updates
Merge a finished branch git merge analysis/churn-eda Combines it into the current branch

The daily loop is: git status, edit, git diff, git add specific files, git commit, and git push before you close your laptop.

Branch naming that keeps analysis work readable

Use a short prefix, a slash and a lowercase description with hyphens. The prefix tells a reviewer what kind of change to expect.

Prefix Use for Illustrative branch name
data/ Ingestion and cleaning data/clean-missing-values
analysis/ Exploration and statistics analysis/sales-trend-eda
viz/ Charts and dashboards viz/monthly-revenue-chart
sql/ Queries and views sql/customer-segments
fix/ Correcting a mistake fix/date-parsing-bug
docs/ README and report text docs/readme-setup-steps

Keep one purpose per branch. If a branch name needs the word “and”, it is probably two branches.

Writing commit messages a reviewer can scan

Write the subject line in the imperative, under about 60 characters, and say what changed and why it matters. Compare these:

  • Weak: update, changes, final
  • Better: Drop duplicate order IDs before revenue aggregation

Commit after each logical step: one cleaning rule, one query, one chart. Small commits are easy to undo and easy to review.

Worked example: a three-day slice of a sales analysis (illustrative)

This is an invented scenario to show the pattern. No code here has been run. Suppose an intern is analysing a practice sales dataset and works on the branch analysis/sales-trend-eda. Running git log --oneline might show:

a91f3c2 Add monthly revenue chart with 3-month rolling mean
7d20be4 Handle null region values by labelling them Unknown
c58a10f Drop duplicate order IDs before revenue aggregation
3be7742 Parse order_date as datetime and set IST timezone note
f10d9aa Add README with dataset source and setup steps
09c4e1b Initial project structure and .gitignore

What this history tells a reviewer:

  1. The project began with structure and ignore rules, not data.
  2. Documentation came early, so the dataset source is recorded.
  3. Cleaning steps are separate commits, so each rule can be questioned or reverted on its own.
  4. The chart comes last, after the data was trusted.

If the duplicate-removal rule turns out to be wrong, the intern can undo just c58a10f with git revert c58a10f and leave the other work intact. A single commit named analysis done would not allow that.

Recovering from common Git mistakes

Situation Fix Notes
Edited a file and want to discard the changes git restore notebooks/eda.ipynb Permanent for uncommitted edits, so check git diff first
Staged the wrong file git restore --staged data/big.csv Keeps the file, removes it from the commit
Typo in the last commit message git commit --amend -m "Corrected message" Only before pushing
Forgot a file in the last commit git add file then git commit --amend --no-edit Only before pushing
Committed on main by mistake Create a branch with git branch analysis/new-work, then move main back with git reset --hard origin/main Confirm the branch exists first; the reset discards local changes on main
A pushed commit was wrong git revert <hash> Adds a new undoing commit; safe for shared branches
Committed a large data file but have not pushed git rm --cached data/big.csv, add it to .gitignore, then git commit --amend or a new commit If it was in an earlier commit, ask your mentor before rewriting history
Pushed a password or API key Revoke and replace the key immediately, then tell your mentor Deleting the file later does not make the exposed key safe
Lost a commit after a reset git reflog, then git switch -c rescue <hash> Reflog keeps a local record for a limited time
Merge conflict Open the file, resolve the <<<<<<< markers, git add, then git commit Notebooks conflict often; coordinate who edits which one

Rules that prevent most disasters

  • Run git status before every commit.
  • Never use git add . until your .gitignore is in place.
  • Do not use git push --force on a shared branch.
  • Work on a branch, and keep main as the version you would show someone.

Handling Jupyter notebooks in Git

Notebooks store outputs, execution counts and metadata, which makes diffs hard to read. Three habits help:

  • Use Restart and Run All before committing so the notebook runs top to bottom.
  • Clear large outputs, such as full dataframes, before committing.
  • Move reusable logic into .py files so changes appear as clean text diffs.

A 14-day Git plan for a two-week analytics internship

A short internship rewards a simple rhythm. The free two-week online programme at CareerSwami runs 14 days, so this plan maps Git habits onto that span. Adjust it to the tasks your track gives you.

Days Analytics focus Git focus
1-2 Understand the problem, locate data Create repository, README, .gitignore, first commit
3-4 Cleaning and validation One data/ branch, one commit per cleaning rule
5-7 Exploratory analysis analysis/ branches, merge when a question is answered
8-9 SQL or modelling work Separate branches; practise git revert on a trial commit
10-11 Visualisation and dashboard viz/ branch, commit chart images that are small
12-13 Report and insights docs/ branch, README update with how to rerun
14 Final review Merge to main, clean the history view, push, confirm the repo opens for a viewer

Git Practice During a Data Analytics Internship at UET Roorkee (COER University)

The institution many students still call UET Roorkee began as College of Engineering Roorkee in 1998, was known as University of Engineering and Technology Roorkee after becoming a state private university in 2021, and was renamed COER University in 2023, according to its official overview page. The campus is on the Roorkee-Haridwar Road in Haridwar district, Uttarakhand, and the university is UGC-recognised. Students should use the current name when searching for notices.

The B.Tech CSE (Data Science) programme page shows an eight-semester path with Python and advanced Python early on, DBMS in semester 3, AI and machine learning in semester 4, and big data analytics and full stack development in semester 5. Git is not named on that page, so version control is best treated as a practical skill added alongside the syllabus. Keeping notebooks, SQL files and cleaning scripts in a repository gives a clean record to show an evaluator.

The same page lists a Summer Internship Evaluation in semesters 5 and 7, a Project Building and Career Preparation course in semester 4, and major project phases in semesters 7 and 8. Duration and evaluation criteria are not stated there, so they should be confirmed with the department.

Support for internships sits with the Training and Placement Cell, which offers technical, soft and aptitude training and coordinates internship placements with companies. Its page gives placement@coeruniversity.ac.in as a contact.

Repository checks before the internship evaluation

  • Ask your department which semester evaluation your internship falls under and what documents it requires.
  • Confirm whether the evaluator accepts a repository link, and whether it should be public or private.
  • Check with the Training and Placement Cell whether the host company has agreed to your sharing project code.
  • Remove datasets, credentials and client data from every commit before sharing a link.
  • Match commit history and README wording to the report you submit.

Repository quality checklist before you submit

  • README states the question, dataset source, tools and how to rerun the analysis.
  • No credentials, personal data or oversized files in any commit.
  • requirements.txt lists the libraries used.
  • Notebooks run top to bottom without errors.
  • Commit messages describe changes; no “final2” or “stuff”.
  • Findings appear in the README or a short report, with charts that have titles and labelled axes.
  • The repository opens correctly when viewed from a logged-out browser, if it is public.

Frequently Asked Questions

Do I need the command line, or can I use a Git GUI as an analytics intern?

A GUI such as GitHub Desktop or the Git panel in VS Code is fine for the daily loop. Learn the core commands anyway, because recovery steps like revert and reflog are easier to follow when you know what they do.

Should I commit my dataset to GitHub as a University of Engineering and Technology student?

Usually not. Commit a small sample only if the licence and confidentiality allow it, and otherwise document where to download the data. Never commit personal or confidential data.

How often should I commit during a 14-day internship?

Commit after each logical step, which usually means several times a day, and push at the end of each session. That gives you a history that shows steady progress.

What is the difference between git revert and git reset?

git revert adds a new commit that undoes an earlier one and is safe on shared branches. git reset moves the branch pointer and can discard work, so use it only on local commits you have not pushed.

How do I avoid merge conflicts in notebooks?

Agree on who edits which notebook, keep each notebook focused on one task, and move shared logic into scripts. If a conflict happens, resolve it in a text editor or re-run the notebook from the cleaner version.

I accidentally pushed an API key. Is deleting the file enough?

No. The key remains in history and may have been copied. Revoke it with the provider, issue a new one, store it in an ignored .env file, and tell your mentor.

Can I show a Git repository as proof of work from an online internship?

It is useful evidence of what you built, but whether your university accepts it for any requirement is for your department to decide. Ask in writing, as described in the verification steps above.

Does a tidy commit history matter to people reviewing a portfolio?

It helps. Clear messages and focused branches show that you work in a reviewable way, though the quality of the analysis and the README still carry more weight.

Related Data Analytics guides

Ready to put this into practice?

Join the free two-week CareerSwami online internship in Data Analytics. The internship, the offer letter and the completion certificate are free.

Start your free 2-week internship

Web Stories

Scroll to Top