Improve the way I push to git and add comment
This commit is contained in:
30
.gitignore
vendored
30
.gitignore
vendored
@@ -1,27 +1,13 @@
|
||||
|
||||
# NAME file
|
||||
42
|
||||
ft_printf
|
||||
|
||||
# Object files
|
||||
*.o
|
||||
|
||||
# Libraries
|
||||
build
|
||||
*.a
|
||||
|
||||
# Shared objects (inc. Windows DLLs)
|
||||
*.so
|
||||
*.so.*
|
||||
|
||||
# Executables
|
||||
*.o
|
||||
*.out
|
||||
|
||||
# Debug files
|
||||
*.so
|
||||
*.dSYM/
|
||||
|
||||
# Temp files
|
||||
.*.swp
|
||||
*~
|
||||
t
|
||||
t1
|
||||
t2
|
||||
t3
|
||||
t4
|
||||
|
||||
t?
|
||||
.DS_Store/
|
||||
|
||||
19
Makefile
19
Makefile
@@ -6,7 +6,7 @@
|
||||
# By: gbaconni@student.42lausanne.ch +#+ +:+ +#+ #
|
||||
# +#+#+#+#+#+ +#+ #
|
||||
# Created: 2022/01/18 15:11:16 by gbaconni #+# #+# #
|
||||
# Updated: 2022/04/16 01:24:13 by gbaconni ### lausanne.ch #
|
||||
# Updated: 2022/04/17 11:19:20 by gbaconni ### lausanne.ch #
|
||||
# #
|
||||
# **************************************************************************** #
|
||||
#
|
||||
@@ -107,18 +107,25 @@ test4: fast
|
||||
|
||||
update: config online pull
|
||||
|
||||
sync: config online pull
|
||||
@git status | grep -q 'nothing to commit' || (git add -A && git commit -am "$$(date '+%F %T')" && git push)
|
||||
sync: config online fetch
|
||||
@git status | grep -q 'nothing to commit' || (git diff; read -p "Comment: " comment; git add -A; git commit -am "$${comment-$$(date '+%F %T')}"; git push)
|
||||
|
||||
online:
|
||||
@dig +short vogsphere.baco.net A | grep -qF '213.5.156.25' || echo 'vogsphere.baco.net unresolvable'
|
||||
@nc -vzw3 vogsphere.baco.net 443 2>&1 | grep -qF 'succeeded' || echo 'vogsphere.baco.net unreachable'
|
||||
|
||||
pull:
|
||||
@git pull
|
||||
fetch:
|
||||
@git fetch
|
||||
|
||||
config:
|
||||
@git config user.name "gbaconni"
|
||||
@git config user.email "gbaconni@student.42lausanne.ch"
|
||||
@git config pull.rebase false
|
||||
@git config pull.rebase true
|
||||
@git config branch.autosetuprebase always
|
||||
|
||||
42:
|
||||
@git clone git@vogsphere.42lausanne.ch:vogsphere/intra-uuid-fd8d00fc-8c22-400e-a8d9-dcc364688380-4092952-gbaconni 42 || true
|
||||
|
||||
21: 42
|
||||
@find libftprintf -maxdepth 2 -type f -name '*.c' -o -name '*.h' -o -name 'Makefile' | sed -r "s|(libftprintf/)|\1./|" | xargs -I {} rsync -SaR {} 42/
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
# By: gbaconni@student.42lausanne.ch +#+ +:+ +#+ #
|
||||
# +#+#+#+#+#+ +#+ #
|
||||
# Created: 2022/01/18 15:11:16 by gbaconni #+# #+# #
|
||||
# Updated: 2022/04/16 00:45:55 by gbaconni ### lausanne.ch #
|
||||
# Updated: 2022/04/17 11:18:36 by gbaconni ### lausanne.ch #
|
||||
# #
|
||||
# **************************************************************************** #
|
||||
#
|
||||
@@ -140,3 +140,19 @@ ft:
|
||||
@echo "functions:"
|
||||
@nm $(NAME) | grep T | grep -o 'ft_.*' | sort -u
|
||||
|
||||
sync: config online fetch
|
||||
@git status | grep -q 'nothing to commit' || (git diff; read -p "Comment: " comment; git add -A; git commit -am "$${comment-$$(date '+%F %T')}"; git push)
|
||||
|
||||
online:
|
||||
@dig +short vogsphere.42lausanne.ch A | grep -qF '185.25.195.180' || echo 'vogsphere.42lausanne.ch unresolvable'
|
||||
@nc -vzw3 vogsphere.42lausanne.ch 443 2>&1 | grep -qF 'succeeded' || echo 'vogsphere.42lausanne.ch unreachable'
|
||||
|
||||
fetch:
|
||||
@git fetch
|
||||
|
||||
config:
|
||||
@git config user.name "gbaconni"
|
||||
@git config user.email "gbaconni@student.42lausanne.ch"
|
||||
@git config pull.rebase true
|
||||
@git config branch.autosetuprebase always
|
||||
|
||||
|
||||
Reference in New Issue
Block a user