Changes between Version 1 and Version 2 of ControlSystems/SoftwareTeam/Training/Git


Ignore:
Timestamp:
Oct 23, 2019, 4:37:31 PM (6 years ago)
Author:
Eileen Wang
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ControlSystems/SoftwareTeam/Training/Git

    v1 v2  
    3232- git merge -when two or more users make changes at the same time, conflicts will occur. VSC will ask you if you'd like to merge, meaning combining users' codes and having you manually edit any errors.
    3333
     34Example 2:
     351.Go to https://github.com/
     362. Click the plus sign at the top left of the page
     373. Click new repository
     384. Name the Repository HelloWorld
     395. Ignore the Description
     406. Leave it on the public button
     417. Check initialize README.md
     428. Click Create repository
     439. Click on the README.MD file and click the pencil icon to edit.
     4410. in the next line, type #hello world
     4511. Scroll down to "Commit Changes", type in "added hello" and press Commit changes
     4612. Click the clone or download green button and copy the URL
     4713. Open up FRC VS Code
     4814. In Vs Code, Press: Ctrl + Shift + P (A search bar will pop up)
     4915. Type in "Git: clone" and click once it emerges
     5016. Paste the URL from the github website and press enter
     5117. A tab will appear at the bottom right of the screen. Press "Open Repository"
     5218. add a new file named "hello.java" by right-clicking under the README.md on the left
     5319. Type in
     54public class hello{
     55    public static void main(String args[]) {
     56        System.out.println("Hello World");
     57    }
     58}
     5920. Run it to check.
     6021. Press: Ctrl + Shift + P (A search bar will pop up)
     6122. Type in "Git: Commit"
     6223. Two windows will pop up; say Yes to both.
     6324. Type in "added hello.java" and press ENTER
     6425. Press: Ctrl + Shift + P and type in Git: push.
     6525. Check on github to see your changes.
     66
    3467Other terminology:
    3568- Branches - when you want to focus on different assets in the code, it may be best to create a branch. This way, you won't have to deal with merge conflicts and can commit your changes freely. For example, often in our robot code, we will have a branch devoted to Arm mechanism or Autonomous version. Check the SpaceBase Repository on https://github.com/Team2537/Spacebase and click on the left-most white button "Branch: Main". Explore the other branches what differences or similarities do you see?