- Those who are yet to land their first job in tech
- Those who have recently landed their first job in tech
- There are different Git workflows - Trunk, GitFlow, GitHubFlow
- Git and GitHub are not the same thing - Going to be using
- Going to use the command line & the GitHub VsCode extension
- You have a GitHub account
- You have Git installed
- Branch - A version of the codebase
- Commit - A unit of change
- Stage
- Merge - Combining two branches
- Pull Request - A request to merge a branch into another branch
- Git is a version control system
- Allows you to track changes to your code over time
- Enables you to collaborate with others on the same codebase
- You can easily revert to a previous version of your code or experiment with new features without affecting the main codebase
- Provides a record of all changes made to your code, including who made them and when, which can be useful for auditing and debugging
- How create a new repository?
- How do I create a new branch?
- How do I make changes on my branch?
- How do I push my changes to GitHub?
- How do I create a pull request?
- How do I merge my changes into the main branch?
- How do I check the status of my repository?
- How do I manage conflicts?
- How do I remove a file and make sure it's not tracked by Git?
git init
- Initialize a new Git repositorygit status
- Show the status of the current branchgit add
- Add a file to the staging areagit commit
- Commit the staged files to the current branchgit log
- Show the commit history of the current branchgit status
- Show the status of the current branchgit branch
- List the branches in the current repositorygit checkout
- Switch to a different branchgit pull
- Pull the latest changes from the remote repositorygit push
- Push the latest changes to the remote repository
-
Use the GitHub VsCode extension
-
Commit early and commit often
-
Use semantic commit messages
-
Make small pull requests - single feature or bug fix
-
Use the GitHub pull request template
-
Write descriptive pull requests
-
Ask team about conflict resolution strategy - rebase or merge
-
Ask team about commit strategy - squash or merge
-
Ask team about workflow - trunk, gitflow, githubflow
-
git config --global push.autoSetupRemote true