-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExercise
20 lines (20 loc) · 1.96 KB
/
Exercise
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Create a directory where you'll be keeping all your projects (~/Projects, ~/dev, ~/coding or something like this)
Create a directory "command-line" in your projects folder
Initialise a git repository inside it
Create a README file with the following content: "This is a list of some of the most useful shell commands"
Add it to the repo and commit it
Create a repo with the same name on Github
Create a remote in your local repo called "origin" pointing to your Github repo
Verify that the remote actually exists and points to the right location
Push local changes to Github
Verify that you can now see your repository on Github (and note how Github displays your README file by default as the project description)
Now create a file called "mv" in your local repo. Commit it locally and push the changes to Github.
Go to Github and find that file there. Edit it by putting the description of the "mv" shell command inside, in your own words. Don't copy the man page, just write what you know about the "mv" command. Commit the changes on Github.
Pull the changes from Github. Cat the file locally to verify that you pulled the change, so the file is not empty anymore.
Do the same for commands "cp", "grep", "wc" and "ps". Use meaningful commit messages that describe well what you are doing.
You should have 11 commits by now: the initial one plus two commits (one local and one done on github) for every command. Verify this by viewing the commit log locally and on Github. Both logs should be in sync. *Make sure they are in sync before proceeding to the next step!***
Delete the local repository by removing the folder
Go to your repo on Github, copy the clone url and clone the repository locally, recreating it
Look at the list of commits. Check that there are no missing commits. Your repo should be in exactly in the same as it was before you deleted it.
Now delete one of the files in the local repository and commit the change.
Push to Github and verify that you don't see the deleted file there.