gitandgithub
gitandgithub
Suhas A
2 0 3 0
1
3
Hello
,
4
5
I’m Suhas
GDG Web3 Lead
6
Topics Covered:
7
What is Git?
8
Why use Git?
9
Basic Git commands
Overview of Github
Collaborating on Github
Basic Activity on forking and submitting a pull request
1 GIT
What is git?
2 Git is a distributed version control system that tracks
changes in code, allowing multiple developers to
collaborate efficiently. It manages project history,
3 enables branching and merging, and helps revert or roll
back changes if needed. Git is essential for coordinating
4
teamwork and maintaining code integrity across
different environments.
5 It was initially developed by Linus Torvalds
(2005) who is also the founder of linux
operating system.
6
7
Why use git?
8
6
Issues and Project Management: Track bugs, feature requests, and tasks.
Actions and CI/CD: Automate workflows, testing, and deployment.
7
Security: Provides code scanning and vulnerability alerts.
8
Benefits:
9
• Facilitates open-source contributions and teamwork.
• Offers project visibility, making it easy to share and collaborate.
• Acts as a backup for your code, ensuring data is not lost.
Collaborating on github
Basic workflow of how opensource collaboration works in github:
1
1. Fork the Repository
2 2. Clone the Repository
3 3. Create a Branch
9
Best practices :
1. Write Clear Commit Messages
1
2. Commit Often, But with Meaning
2
3
3. Use Branches for Features and Fixes
2 2. Add your name and usn to the readme file and commit the changes the forked repository
9
Basic git commands:
1. git init: Initializes a new Git repository in the current directory.
3. git status: Shows the current status of your working directory, including changes to be committed.
4. git add <file>: Stages changes (adds them to the next commit).
5. git commit –m “message”: Records the staged changes to the repository with a descriptive commit message.
7. git pull: Fetches and merges changes from the remote repository into your local branch.
3
Thank
4
5
you
6
Connect with me
7
8
https://www.linkedin.com/in/
LinkedIn:
suhas-amaresh-a5a431228/
9