How can I log the branch that I am currently working in?

3 visualizaciones (últimos 30 días)
Erik-Jan van Harn
Erik-Jan van Harn el 29 de Abr. de 2019
Editada: Jan el 29 de Abr. de 2019
Hi,
I am trying to include the branch I am currently working in, in my log file. You can directly ask for the branch you are working by typing "!git branch" in the command window, but I am unable to store the resulting branche to a variable so I can actually log it.
Does anyone have experience? I don't want to hard code the branch in use, since this seems a littile vulnerable to mistakes.
Thanks,
Erik-Jan
  3 comentarios
Erik-Jan van Harn
Erik-Jan van Harn el 29 de Abr. de 2019
Perfect, thank you sir!
Adam Danz
Adam Danz el 29 de Abr. de 2019
I'll make use of that, too, Jan! That should be an 'answer'.

Iniciar sesión para comentar.

Respuesta aceptada

Jan
Jan el 29 de Abr. de 2019
Editada: Jan el 29 de Abr. de 2019
[status, msg] = system('git branch');
Then use msg afterwards.

Más respuestas (0)

Categorías

Más información sobre Model, Block, and Port Callbacks en Help Center y File Exchange.

Productos


Versión

R2017a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by