https://github.com/tomdoestech/just-enough-git
https://github.com/tomdoestech/just-enough-git
git
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/tomdoestech/just-enough-git
- Owner: TomDoesTech
- Created: 2023-03-16T10:09:14.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-16T10:34:19.000Z (about 3 years ago)
- Last Synced: 2025-07-14T14:05:02.923Z (10 months ago)
- Topics: git
- Language: HTML
- Homepage: https://www.youtube.com/watch?v=wx3ultvbzUY&ab_channel=TomDoesTech
- Size: 3.91 KB
- Stars: 3
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Just enough Git to be productive
## Who is this for?
* Those who are yet to land their first job in tech
* Those who have recently landed their first job in tech
## Notes
* 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
## Assumptions
* You have a [GitHub account](https://github.com/)
* You have [Git installed](https://git-scm.com/)
## Terms
* 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
## What is Git?
* 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
## Common tasks you need to do with Git
* 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?
## Commands
* `git init` - Initialize a new Git repository
* `git status` - Show the status of the current branch
* `git add` - Add a file to the staging area
* `git commit` - Commit the staged files to the current branch
* `git log` - Show the commit history of the current branch
* `git status` - Show the status of the current branch
* `git branch` - List the branches in the current repository
* `git checkout` - Switch to a different branch
* `git pull` - Pull the latest changes from the remote repository
* `git push` - Push the latest changes to the remote repository
## Pro tips
* 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
## Lear more
* [Git Immersion](https://gitimmersion.com/)