OpenSprintera: Where Open Source Sparks a Sprint of Possibilities
Key Highlights:
🌐 Git & GitHub Mastery: Learn the essentials of version control and collaborative coding using Git and GitHub.
🚀 Explore Open Source: Navigate through diverse open-source projects and find your niche.
🌟 Benefits of Contribution: Uncover the impact and personal growth opportunities through contributing to open source.
💡 Earning from Passion: Learn how your passion for open source can translate into valuable opportunities.
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
1.
2. Code is like poetry, and Git
helps us write it together,
beautifully and
collaboratively, one commit
at a time.
Srinjay Das Gupta
Google DSC’23 Web Dev Lead
Narula Institute of Technology
7. What is Git?
Git is free and open source software for distributed version
control: tracking changes in any set of files, usually used for
coordinating work among programmers collaboratively
developing source code during software development.
8. Basic Git Commands
1. git init:
This command initialises a new git repository
2. git clone:
This command creates a copy of a remote
repository in your local machine
3. git push:
This command updates staged local changes to the
remote
4. git pull:
This command updates local machine with changes
made in the remote
16. Narula Institute of technology
How do we Rebase
● First we checkout the branch we want to
rebase
● Then we run the command:
git rebase <target branch name>
17.
18. Merging vs Rebasing:
Merging Pros
● Preserves History 📑
● Better for Merge
Conflicts✅
● Easy to undo 🔄
Rebasing Pros
● Cleaner History 📃
● More readable graph 👀
● Tougher to resolve
conflicts ⚠️
28. How to Stash and apply stashed changes?
Stashing Changes:
To stash unstaged changes, you
simply run the command: git
stash and it will store all the
changes in the stash stack.
There are two ways of applying
stashed changes:
● git stash apply: This
applies the most recent
stashed change to the
working directory but it
also keeps it stored in the
stash stack
● git stash pop: It does the
same work, but deletes it
from the stash stack
30. Git cherry-pick lets you
selectively apply
individual commits from
one branch to another.
Cherry Picking Illustration
Narula Institute of Technology
31. How to Cherry Pick
To cherry pick a commit we need the SHA of the commit(s).
This can be done by running a git log on the branch from
where to cherry pick.
Finally to cherry pick:
● Checkout the target branch
● Run: git cherry-pick <commitSHA>
● To cherry pick multiple commits, add the SHA ids of the
commits one by one and git will cherry pick them in the
order they are given in the command. Like:
git cherry-pick <commit1SHA> <commit2SHA> ...
32. Of course, your alternative is to copy-paste all your changes to
the new branch.
33. CAUTION ⚠️
Cherry Picking should be used
sparingly because:
● it can lead to merge
conflicts
● it can cause duplicate
commits on separate
branches
35. How to Squash
There are two ways to squash
commits:
● Interactive Rebase
git rebase -i <target
branch name>
● And “--squash” to “git
merge”, i.e.,
git merge --squash
36. WorkEx doesn’t require a
job letter. You just need a
laptop and a will to work.
Narula Institute of Technology
Rajdip Bhattacharya
Google DSC’23 Cloud & DevOps Lead
38. Why Open-source? And why
should you do it?
● Open source encourages innovation through collaboration.
● It allows customers to know how the code works, facilitating the development
of the most innovative software.
● It allows reuse and recycling of code, making it easier to collaborate and
achieve goals, rather than to recreate the wheel.
39.
40. ● Open source communities
● Growth and networking
● Skill development
● Scope of full time offers
● Bounty
Narula Institute of Technology
Perks of Open Source
41. Community Questions
● How to find relevant projects
for our contributions?
● When learning a framework, how
can I gauge my readiness to
contribute to an open-source
project despite feeling
overwhelmed by real codebases?
As web developers, mastering Git is essential. Today, we'll explore this invaluable tool, breaking down its magic and transforming you from a solo coder to a collaborative rockstar! Forget confusion, embrace clarity, and let's write code that shines even when we're working in different time zones.