Languages
[Edit]
EN

Git - xargs with git branch - fatal: branch name required

4 points
Created by:
sienko
743

Problem:

Edit

When I execute command line:

I get error:

I'd like to execute another command after &&
but when I get this error it won't work

Solution:

Edit

Just add to xargs

// your command fixed

Explanation:
// when we don't have any local branches except master, run:

// we will get error:

// FIX - add '--no-run-if-empty' to xargs

// we will get no result

From xargs man:

manuals:
http://man7.org/linux/man-pages/man1/xargs.1.html
https://git-scm.com/docs/git-branch

1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Git

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join