Awesome Git

Cover image

Awesome Git

A curated list of amazingly awesome Git tools, resources and shiny things.


1. Save Your Work (Optional)

If you have uncommitted changes in the up branch, stash them to avoid losing work:


2. Update the default Branch

Switch to the default branch and bring it up to date:

This will pull the latest changes from the remote default branch into your local default branch.


3. Reconcile Diverging Branches

If you need to merge changes from default into up, switch to the up branch and merge:

If there are merge conflicts, Git will prompt you to resolve them manually. Once resolved, continue with:


4. Push Changes to up (Optional)

If you’ve updated the up branch and want to push it to the remote repository:


5. Fix Force Push Error

If you’re trying to push to main but it doesn’t exist locally or remotely, confirm the branch name:

If main exists remotely but not locally, fetch and check it out:

Then push changes:

If main does not exist and you’re using default as the main branch, continue using default.


6. Remove Cached Files

If you still need to run git rm --cached ., ensure you specify the -r flag to remove files recursively:

This removes all files from the staging area without deleting them from your working directory.


7. Reset and Force Push

If you want to reset the remote branch to your local branch forcibly:

Note: Use force-push carefully, as it overwrites the remote branch with your local version.


8. Verify Status

Check your Git status and branch alignment to confirm everything is in sync:


Optional: Automate the Workflow

If this process needs to be automated for recurring updates:

  • Use a shell script to fetch, merge, and push changes.

  • Schedule the script using a cron job for automation.

Contributing

Pull requests on interesting tools/projects/resources are welcome.

Table of Contents

Tutorial

There are tons of learning material on the Web

Style Guide

Style guide when you work with git

Client

Git clients are available on every platform, from mainframe to your mobile device

Repository Hosting

People have plenty of options to host their source code

Self-Hosted Repository

Or you can host the code yourselves

Workflow

Inexpensive branching allows people adopt workflows other than the classic centralized workflow

Comparing workflows

No single workflow fits everyone's need

Hook management

Git provide hooks at commit/push phrase, allowing integration with and code quality checking tool and Continuous Integration (CI)

Tools

Various tools for daily operations

Extensions

Git is designed for source control management. but people extend the idea and push version control to everywhere

Last updated