简体   繁体   中英

Git(Github) : How to sync two separate directories and pick the latest changes

Background

So, I'm working on two Android projects, with a shared module. I don't know how I'd keep this module in sync with the latest changes across the two projects.

Assume:

projectA : github/android/projectA/shared_module
projectB : github/android/projectB/shared_module

So whenever I change something at shared_module in Project A, I have to manually import again the module into Project B.

Anyway I can achieve this with Git? Or any other way to keep this sync, even if not through Git?

You can publish this module as your own library.

may this tutorial help you:

  1. Building-your-own-Android-library
  2. official android-library doc.
  3. publish-an-android-library-by-jitpack (Good Tutorial).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM