-
Notifications
You must be signed in to change notification settings - Fork 0
Home
PotatoScript edited this page Aug 17, 2025
·
34 revisions
| Title | Remark/Code |
|---|---|
| 2025-08-17 (日) | Generate and add an SSH key to GitHub |
| SSH-Key-Setup | This will allow you to clone, pull, and push to GitHub using SSH without password prompts. |
| Introduction to Git | What is Git? Why use Git? Difference between Git and GitHub |
| Installation | Install Git on Windows, macOS, Linux |
| Git Basics | Understanding repositories, commits, branches, remotes |
| Setting Up Git | Configure username, email, aliases using git config
|
| Alias Setup | Create shortcuts for long Git commands |
| Basic Git Commands |
init status commit log add diff checkout reset
|
| Creating a Repository | Initialize and configure a new repository |
| Working with Files | Adding, modifying, deleting files in Git |
| .bashrc file | Customize Git command aliases |
| .gitignore file | Ignore files and directories from tracking |
| Editing Files | Read/edit files using cat vim nano code
|
| Staging and Committing |
add commit commit --amend
|
| Branching & Merging | Managing branches and merging changes |
| Creating & Switching Branches |
branch checkout switch
|
| Merging Branches |
merge rebase cherry-pick
|
| Rebasing |
rebase rebase --interactive
|
| Squashing Commits |
rebase -i to combine multiple commits |
| Cherry-Picking | Apply specific commits from another branch |
| Working with Remote Repositories | Connecting local Git to remote repositories |
| Adding a Remote Repository | git remote add origin |
| Cloning a Repository |
git clone to copy a remote repository |
| Fetching, Pulling & Pushing |
git fetch git pull git push
|
| Moving Local Repo to Remote |
git remote add git push -u origin
|
| Undoing & Resetting Changes | Fix mistakes and revert changes |
| Undoing Changes |
reset restore checkout reflog
|
| Unstaging Files |
restore reset HEAD clean
|
| Reverting Commits |
revert commit --amend
|
| Reset, Checkout, Restore |
checkout reset restore
|
| Restoring a File to an Earlier Version |
restore checkout reset
|
| Viewing and Comparing Changes | Track modifications in your project |
| Viewing Staged & Unstaged Changes |
diff diff --staged difftool
|
| Comparing Commits |
diff log --oneline
|
| Viewing the History |
log log --graph
|
| Viewing a Commit |
show ls-tree
|
| Handling Merge Conflicts | Resolve issues when merging branches |
| Troubleshooting Merge Conflicts | Using merge rebase conflict resolution |
| Working with Stashes |
stash stash pop stash apply stash drop
|
| Git Tagging & Releases | Manage software versions using tags |
| Tagging Commits |
git tag git tag -a git tag -d
|
| Working with Feature Branches |
checkout -b merge rebase
|
| Advanced Git Features | Powerful Git tools for workflow |
| Git Hooks | Automate tasks with pre/post-commit hooks |
| Git Submodules |
submodule add submodule update
|
| Interactive Rebase |
rebase -i to modify commit history |
| Bisecting |
git bisect for debugging commits |
| Git Collaboration | Best practices for working with teams |
| Forking and Pull Requests | Fork, clone, modify, submit PRs |
| Code Reviews with GitHub | Using GitHub for reviews and approvals |
| Security and Best Practices | Keep your codebase secure |
| Signing Commits | Use GPG to sign Git commits |
| Git Best Practices | Writing good commit messages, branch strategies |
| Git for DevOps & Automation | Using Git in CI/CD pipelines |
| Git in CI/CD Pipelines | Automate testing and deployments |
| Git Internals & Performance | Deep dive into Git |
| Understanding Git Internals | Objects, trees, and commits |
| Optimizing Git Performance |
gc fsck repack to clean and speed up |
| Git Wiki Repository | Documenting with Git |
| Wiki Repository | Manage GitHub Wiki repositories |