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.
Evolving Data Governance for the Real-time Streaming and AI Era
Â
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.