0

I like to copy development files (ie a git repo) from my local machine to my android using adb push (I still couldn't find a reliable git client application on android).

However, I also need to ignore certain directories (think of the directories that are typically ignored by git and placed in .gitignore).. such as the build folder in a java project.

How do I make an adb push command that ignores a certain directory but copies everything else?

4
  • 1
    Afraid not at all unless writing a script walking the tree recursively and skip them as you defined.
    – Izzy
    Jul 17, 2018 at 6:30
  • Isn't there a reliable free (or even paid!) Android git client? I find this embarrassing
    – abbood
    Jul 17, 2018 at 6:32
  • The only free one coming to my mind is MGit, if paid ones are acceptable maybe also Pocket Git. If you want a command-line variant, Termux would be the way to go (you can install git from within Termux). As I'm not using any such client I cannot tell how reliable they are.
    – Izzy
    Jul 17, 2018 at 9:17
  • I use Termux a lot and it's very reliable. Must give it a try.
    – iBug
    Jul 17, 2018 at 11:27

1 Answer 1

1

This sounds like an XY problem as excluding files and directories with adb push isn't what you're really intending to do.

If you're syncing Git repositories, the best option is a Git client. The one I'm currently using is Termux and I do a lot of development on my phone with it.

Download Termux and use its built-in APT package manager to install Git and you'll be able to process your work easily.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .