From 434d64f6afdfb41d6e6460931b24351645a37016 Mon Sep 17 00:00:00 2001 From: Edi De Candido Date: Mon, 17 Apr 2023 19:54:18 +0200 Subject: [PATCH] lista comandi git 1/? --- Makefile | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b7b0fb4..8303ef9 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,8 @@ FILES := $(notdir $(basename $(SRCS))) OBJS := $(addprefix $(OBJ_DIR)/,$(addsuffix .o,$(FILES))) -all: execute +all: + execute: linking @ echo execute... @@ -47,4 +48,33 @@ $(OBJ_DIR): mkdir -p $(OBJ_DIR) clean: - @ rm -rf $(OBJ) \ No newline at end of file + @ rm -rf $(OBJ) + + + +# random git command +# lista file +git_list: + git ls-tree -r master --name-only + +# push +git_push: + git push + +# commint add message +_commit: git_commit git_push + +git_commit: + read -p "Enter git message: " msg; \ + git commit -am "$$msg" + +# remove a file only on git, not local +_remove: git_rm git_push + +git_rm: + git rm --cached $(FILE) + + +# difference between local and git +git_diff: + git diff