Comment on page

Updating From Latest

This guide will help you update from the latest version of the code from the main repository.
There are two common ways of obtaining a copy of Nextacular:
  1. 1.
    Forking from the main repository
    1. 1.
      This will retain all the commit history of the origin repository
  2. 2.
    Using the main repository as a template
    1. 1.
      This will create a fresh repository with only one commit, the initial commit
    2. 2.
      This is also similar to downloading a copy of the repository and pushing it to your own repository
As the main project progresses, the repository is constantly growing in terms of commits. The committed files may have been changed from the original source code you have copied to your repository before.
To get all changes from the origin repository let's follow the steps below:
  • Make sure you don't have any pending changes to commit, better yet, push all changes to your working branch
git add .
git commit -m "Add recent changes"
git push origin <BRANCH>
  • Let's check our remote sources
git remote -v
  • If ever we don't have any remote sources for the template repository yet, let's add it
git remote add template
  • We should expect 2 remote sources after this command
git remote -v
  • Next, we should get all meta information of the remote repositories
git fetch --all
  • Now, let's merge the changes from the latest changes of the original repository into your repositories working branch
git merge template/main
If this command throws an error about "refusing to merge unrelated histories", we can add this convenient option --allow-unrelated-histories to do what its name says
Expect to see code conflicts after merging. Open your codebase with your favorite editor and manage all conflicts that came up after the merge. You can use VSCode's source control window to manage the conflicts, or you can manually visit your individual conflicting files.
Moreso, if you don't feel like using Git, you can use a diff tool such as Meld to manage, compare, and cherry-pick the changes from its awesome user interface.