Skip to content

CAEN Windows Git Setup

Guthrie edited this page Oct 18, 2023 · 7 revisions

Please follow this tutorial if you have a mac/linux machine and have to use CAEN Windows to devlop for ehw.

Follow this tutorial in the CAEN windows environment.

1. Download Git bash

Go to this link https://git-scm.com/download/win and hit the Click here to Download link at the top of the screen

This will download the git bash exe. Please click on it at the bottom of your chrome browser.

Once you click on the executable, you will be prompted with this:

Screen Shot 2023-04-20 at 11 34 22 PM

Once you hit next, you will be prompted with this screen:

Screen Shot 2023-04-20 at 11 35 26 PM

Please DO NOT hit next!!! Rename your install path to N:\windat.v2\Desktop\Git. Before proceeding make sure your screen looks exactly like this.

Screen Shot 2023-04-20 at 11 37 03 PM

Now you can proceed with the regular setup (do not change any default settings the setup process provides you, just keep hitting next). After finishing the setup, git bash should be on your desktop for regular access!

2. Setup Your Working Directory

Before using git bash to develop on the mrover electrical github, there are a few things that need to be done.

First, you need to use the correct directory for your files so they save universally on CAEN. Your home directory will default to the temporary CAEN instance every time you login. So if you let files save without specifying a path, they will be erased once you logout of your CAEN instance. This means that the location in which you store your mrover-electrical directory is very important.

I would suggest to store your directory in the Documents folder inside the N drive, which is the drive that follows every CAEN computer. The way you can enter this directory is by opening up git bash and typing cd /n/windat.v2/Documents

Once you enter this directory, everything you save here will not be local to you instance of CAEN, but will be global across every CAEN instance you create.

Now that you are inside a good working directory, you will need to create an access token in order to interface with github (push/pull code). You may be wondering why you can't use an SSH key instead of an access token on CAEN Windows... That is a splendid question! If you end up figuring out a way to get SSH working on windows CAEN, please let me know (contact Mihir Kozarekar mkozarek@umich.edu).

Anyways, you need to create an access token which can be done if you follow these steps to a tee.

Before proceeding, make sure you have saved a github access token to somewhere secure on you local machine. Also, ensure that you are in the Documents folder inside your N drive (if you print working directory pwd inside terminal you should see /n/.... Once you have confirmed that, you should be able to clone the mrover-electrical repository! To do this, enter git clone https://github.com/umrover/mrover-electrical.git to you terminal. If you are working inside a branch, type git checkout [existing branch name], e.g., git checkout pdb. Now please make any new boards/projects in this folder and make sure you git pull before you start working and you git push before you logout. Finally, since you are using an access token, on your first push/pull you will be prompted to enter it in order to successfully push/pull, so please do that!

Congratulations! You now have access to github on CAEN!

If you have any questions about this tutorial or feel like it is missing a step here or there, please contact Mihir Kozarekar (mkozarek@umich.edu)!

Also, quick tip: do git config user.name "Full Name" and git config user.email "email@email.com inside your mrover-electrical directory to setup your name and email associated with your github account that you want to push from.