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

4 次查看(过去 30 天)
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

采纳的回答

Jan
Jan 2019-4-29
编辑:Jan 2019-4-29
[status, msg] = system('git branch');
Then use msg afterwards.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Model, Block, and Port Callbacks 的更多信息

产品


版本

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by