How to setup the development environment
Forking the repository#
- Login to your bitbucket account
- Navigate to N.I.N.A.'s main repository and click on the big plus
- Click "Fork this repository"
- You will see a configuration wizard for your fork.
- Enter a name for your forked repository. (This guide will use "ninaexamplefork" for reference)
- Give a short description what your intention is with this fork (optional)
- Uncheck Issue tracking and Wiki as you don't need this in your fork.
- Click on "Fork repository"
- You will be navigated to your new repository at https://bitbucket.org/\<your_username>/\<your_fork's_name>/
- On the top right of your forked repository click on the "Clone" button
- A pop up will show the command how to clone this repository to your local machine
- Open a command window
- Navigate to the folder where you want your repository folder should be created in
- Enter the command that was shown in step 2.
git clone https://<YourUserName>@bitbucket.org/<YourUserName>/<YourForkName>.git cd <YourForkName>
- Navigate to the created sub folder
- Next you need to add a the "upstream" to the root repository (where your fork is based on). This is later required for merging from the main dev branch etc.
git remote add upstream htps://<YourUserName>@bitbucket.org/Isbeorn/nina.git
Fetching the Large File Storage files#
- Bitbucket will not automatically copy over the LFS into the fork repository. This has to be done manually
- Run the following commands to sync the lfs
git lfs fetch --all upstream git lfs push --all origin git lfs pull
Navigation in Visual Studio#
- Navigate to your local clone and open "NINA.sln"
- Visual studio has a built in git UI, which you can find on the lower right called "Team Explorer"
- Inside the Team Explorer you can get a visual list of all available branches
- Here you can see all branches of your forked repository. Note that the upstream we added earlier is not yet displayed.4. Expand "remotes\origin" and double click on "develop" to switch to this branch
- Click the back button (top left) and click on "Sync"
- Click on "Fetch" and select "upstream" to fetch all branches that are inside "upstream", which is the root repository
- Now navigate back and select the "Branches" again. Now the "upstream" branches are also available.
- To fetch and merge the latest code of the root repository you can right click on "develop", click on "fetch" and "Merge from..." afterwards.
- Now your branch is up to date and you can start coding.