git
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
git [2023/11/30 08:57] – [Getting rid of Git History] skipidar | git [2025/08/24 14:25] (current) – [Gitflow Workflow] skipidar | ||
---|---|---|---|
Line 35: | Line 35: | ||
{{https:// | {{https:// | ||
+ | |||
+ | |||
+ | < | ||
+ | Default Branch Names: | ||
+ | |||
+ | Production Branch (master or main): This branch should always reflect the production-ready state of your project. | ||
+ | |||
+ | Development Branch (develop): This is the main branch for all new development. Feature branches are created from develop and merged back into it. | ||
+ | |||
+ | |||
+ | Feature Branch Prefix (feature/): For new features. | ||
+ | |||
+ | Release Branch Prefix (release/): For preparing a new production release. | ||
+ | |||
+ | Hotfix Branch Prefix (hotfix/): For quick fixes to the production branch. | ||
+ | |||
+ | Support Branch Prefix (support/): For long-running support branches (less common but available). | ||
+ | |||
+ | Version Tag Prefix (v): Used for tagging releases. | ||
+ | </ | ||
+ | |||
==== FallPits ==== | ==== FallPits ==== | ||
* Use the http / https repository for cloning. | * Use the http / https repository for cloning. | ||
Line 351: | Line 372: | ||
git push origin --delete latest_branch | git push origin --delete latest_branch | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ==== Remove unreachable blobs, reduce size of repo ===== | ||
+ | |||
+ | '' | ||
+ | |||
+ | |||
+ | Sometimes in '' | ||
+ | Even if you removed the history on the current branch, they might persist blowing up the repo. | ||
+ | |||
+ | To clean them up - use the garbage collector. | ||
+ | |||
+ | <sxh shell> | ||
+ | |||
+ | # This command is used to expire all entries in the reflog that are not reachable from the current commit (i.e., entries that are not part of any branch or tag). The --expire-unreachable=all flag specifies that even unreachable entries (such as commits that were " | ||
+ | # The --all flag ensures that it applies to all branches and tags, not just the current branch. | ||
+ | git reflog expire --expire-unreachable=all --all | ||
+ | |||
+ | |||
+ | |||
+ | # This command triggers Git's garbage collection process (gc stands for " | ||
+ | |||
+ | git gc --prune=all | ||
</ | </ |
git.1701334654.txt.gz · Last modified: by skipidar