Je suis en train de créer un alias pour mon flux de travail "fusionner à la mise en scène". Disons que j'ai terminé une tâche dans la branche "dev/layout_fix" et que je veux la déployer dans le staging après l'avoir validée.Git config alias problème
Voici ma voie:
git checkout staging
git merge dev/layout_fix --no-ff
git push
git checkout dev/layout_fix
Maintenant, je l'ai essayé cette approche:
[alias] branch-name = "!git rev-parse --abbrev-ref HEAD" stagify = "!git checkout staging && git merge $(git branch-name) --no-ff && git push && git checkout $(git branch-name)"
mais le nom de branche alias est "staging" en raison de la vérification.
Est-il possible d'écrire le nom de la branche actuelle dans une variable avant que la mise en scène soit extraite?
Oui, c'est tout! Merci beaucoup. – bambamboole