-
Notifications
You must be signed in to change notification settings - Fork 0
/
lab03.txt
69 lines (36 loc) · 3.36 KB
/
lab03.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
For this assignment you will be using version control, which is necessary to work effectively in a software team.
"What is version control, and/or what is Git?" Read: https://git-scm.com/book/en/v2/Getting-Started-About-Version-Control (Links to an external site.)
For this assignment you will follow the instructions at the above link to:
- Set up git on your machine (https://git-scm.com) See Chapter 1 of the linked text.
- Establish a directory to play in, and initialize it. Having a play space is very important. When you aren't sure exactly what something does in git, you can go to your play directory and test things there.
- Read Chapter 2. Play with add, commit, status, diff, diff --staged, reset, log.
- In your play directory, create four files. Make it so that: one is untracked; one is modified; one is staged; one is in the repo. Verify the state of your four files and ask another person to confirm you have those four files in four states.
In this space, type the sequence of commands you used to achieve the final state of all four files:
touch file1 file2 file3 file4
git add file2 file4
git commit -m "added files to repo"
vim file2
git add file3
%%%%%%%%%%%%%%% Working with GitHub %%%%%%%%%%%%%%%%%%%%%%
- Create a Github account (at www.github.com (Links to an external site.)), write down your username below.
Pine9
- Clone this repository to your local machine: https://github.com/nmerrill67/cisc275-fall2019-first-git (DO NOT FORK IT)
Create an empty repository under your GitHub account and name it "cisc275-fall2019-first-git".
Paste the URL of your repository here: https://github.com/Pine9/cisc275-spring2020-first-git
Back in your machine, create a new local repository:
- Create file named your <FirstInitial><LastName>.txt. Write your username and URL to your GitHub repository created in previous steps in the file. Upload this file on canvas.
- Add file to the new local repo
- Add MyCompare3 and your java files as specified in the README.
- Answer the questions 2 and 3 in the README file (write answers in the file itself) and add file to your local repo.
- Commit local changes
- Push commit to master branch of your GitHub repo
- Upload the file <FirstInitial><LastName>.txt on canvas with details of your username and URL to your GitHub repository created in previous steps.
Very useful links:
https://help.github.com/articles/set-up-git/ (Links to an external site.)Links to an external site.
https://help.github.com/articles/cloning-a-repository/ (Links to an external site.)Links to an external site.
https://help.github.com/articles/adding-a-file-to-a-repository-from-the-command-line/ (Links to an external site.)Links to an external site.
There is also a GitHub desktop application that you can use instead of command line. It is not recommended. The command line avoids problems, leads to understanding, and helps you prepare for exams.
While I am not a fan of the Eclipse extension for git (I've had many issues with it in the past), you should know that it exists. You are free to use it if you wish, but I do not recommend and we will not be very helpful if there are issues with it. You can find it here:
http://www.eclipse.org/egit/ (Links to an external site.)
Cygwin shell for Windows: http://www.cygwin.com/
Windows Powershell: https://www.infoworld.com/article/3126427/microsoft-windows/go-pro-the-power-users-guide-to-powershell.html