Skip to content

How To Upload A Code Change

MaynardMiner edited this page Jan 22, 2020 · 11 revisions

Developing SWARM

I have had multiple users state "I wish I knew how to make changes, or I would help you.". It is actually super simple to make changes.

Here is a step-by-step guide to developing SWARM with videos explaining very simply how git works.

1.) Install Visual Studio Code

https://code.visualstudio.com/Download

2.) Install Powershell Extension

Visual Studio Code MUST always be ran as root, or else you will get issues with file permissions.

Linux: sudo code --user-data-dir

Windows: run exe as administrator.

Go to extensions window (ctrl + shift + x), type powershell in the search box- click the install button for the powershell extension. If you open SWARM, and click on some of the files- it should all be color coded and ready to go! Even if you don't code - This is a great way to manage your configs, since it will let you know of typos and issues.

3.) Install git & Register It

sudo apt-get install git (linux)

https://git-scm.com/downloads (download and install).

Both linux and windows from either command prompt/terminal-

git config --global user.name [username]

git config --global user.email [email]

4.) Fork SWARM

Go to github.com and select the fork button on the upper right hand of the screen of my repository.

Now clone your fork.

git clone https://github.com/[username]/SWARM.git

It will download and turn into SWARM folder in the directory your were in.

You are now ready to code!

Here is a video on how to manage a git in Visual Studio Code:

IMAGE ALT TEXT HERE

Here is a video no how to manage a git from command prompt/terminal, and how to send me a pull request:

IMAGE ALT TEXT HERE

Note: .gitignore

You may notice that you make a change, but it does not appear as a change. That is because SWARM has .gitignore file, which tells git to ignore certain files and folders that is generated by SWARM during its runtime. If your change doesn't appear, check if the directory or file is in the .gitignore file. If it is, you can simply remove it. I can fix this later on when you send me a pull request, or you can add the file/directory back in after you have committed a change and then push that change as well.