Working with Git Submodules

  • The ‘url’ gives the repository URL link for the respective submodules using which Git clones the project.
  • The two sample submodules are ‘SampleModule1’ with URL and ‘SampleModule2’ with URL start by initializing a Git repository for SampleProject, to do this we use the command in the terminal:

    git init

    2)We’ll create a SampleFile for initial commit using any text editor and commit the file using the command:

    git add.

  • We have the details for the submodule above, using that we’ll integrate those repositories into our project as one of the subdirectories:

    git submodule add git submodule add 3.

  • a)Now both the submodules are added to your project, if we check the repository tracking status in SampleProject directory using ‘git status’, we’ll get the following output:

    git status

    Here three files are created ‘.

  • git/modules/

    “Commands Quoted From try removing the SubModule1Local from our project:

    git submodule deinit SubModule1Local

    My project folder now looks like,

    -Working in Submodule: You can directly work in the repository of the submodule by changing the current working directory to the subdirectory of the submodule.

Working with Git is great. The modern version control system that boosts a distributed architecture has much to offer when compared to many of
Continue reading “Working with Git Submodules”

Easier Upgrades Thanks to Git

  • As a conclusion, I would say, enjoy the feature and feel free to suggest improvements, report issues and especially send pull requests .
  • If we had embedded the implementation in the local-cli, you wouldn’t be able to enjoy this feature when using old versions of React Native.
  • $ npm install – g react – native – git – upgrade $ cd MyProject $ react – native – git – upgrade 0.38 .
  • The react-native-git-upgrade is provided so anyone can enjoy this improved experience today while using older versions of React Native.
  • The patch contains all the changes made in the React Native templates between the version your app is using and the new version.

None of those options is ideal. By overwriting the file we lose our local changes. By not overwriting we don’t get the latest updates.
Continue reading “Easier Upgrades Thanks to Git”