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
1
git add .
2
git commit -m "Add recent changes"
3
git push origin <BRANCH>
Copied!
  • Let's check our remote sources
1
git remote -v
Copied!
  • If ever we don't have any remote sources for the template repository yet, let's add it
1
git remote add template https://github.com/nextacular/nextacular.git
Copied!
  • We should expect 2 remote sources after this command
1
git remote -v
Copied!
  • Next, we should get all meta information of the remote repositories
1
git fetch --all
Copied!
  • Now, let's merge the changes from the latest changes of the original repository into your repositories working branch
1
git merge template/main
Copied!
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.
Copy link