From 2da4a5bfb9d3231fe28c2eebf6e03030ec856d1f Mon Sep 17 00:00:00 2001 From: Alejandro Falkowski Date: Sun, 24 Mar 2024 19:22:38 +0100 Subject: [PATCH] feat(build): add git commands for makefiles (#46) --- Makefile | 2 ++ build/make/git.mak | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 build/make/git.mak diff --git a/Makefile b/Makefile index f1d4f10..a3b42a9 100644 --- a/Makefile +++ b/Makefile @@ -1,2 +1,4 @@ +include build/make/git.mak + # Lint all the files lint: diff --git a/build/make/git.mak b/build/make/git.mak new file mode 100644 index 0000000..f346af8 --- /dev/null +++ b/build/make/git.mak @@ -0,0 +1,28 @@ +master: + git checkout master + +pull: + git pull --rebase + +add: + git add -A + +# Start a new feature, bug, etc. +start: master pull + git checkout -b $(name) + +# Finish a the feature, bug, etc. +finish: master pull + git brand -D $(name) + +# Sync the current feature, bug, etc. +sync: + git fetch && git rebase origin/master + +# Amend the latest changes. +amend: add + git commit --amend --no-edit + +# Push the latest changes. +push: + git push -f origin $(name)