Author: Shuto Araki
Date: 10/01/2018
This allows you to copy this repository that you own and play around with!
-
Create a folder named
git_practice
on your Desktop (or wherever you like). -
Open Terminal (Mac) or Command Prompt (Windows). This application helps you navigate through files in your computer without GUI (Graphical User Interface). Back in the day before Windows or Mac OS came out, this is how people used to operate computers!
-
Here's a good command for ya:
cd [directory-name]
will change directory. From your default current working directory, typecd Desktop
. Try navigating to yourgit_practice
folder. -
Go back to your repository that you just forked. You see the green button that says "Clone or Download"? Click on it and copy the address you see. In my case, it is
[email protected]:ShutoAraki/PracticeSession.git
. -
On Terminal, type
git clone [whatever address that you just copied]
. So in my case, I would typegit clone [email protected]:ShutoAraki/PracticeSession.git
. This will create a new folderPracticeSession
, which is a copy of your remote repository on the foldergit_practice
. This folder is now your local repository!cd PracticeSession
to get into the repository.
Remember git add .
, git commit -m "Message"
, and git push
? Try those commands on your Terminal or Command Prompt.
-
Create a new text file and type whatever you like and add it to your
PracticeSession
folder. -
Go back to Terminal on the folder and type
git status
. It tells you what files you haven't committed or staged. -
Stage the new text file by typing
git add .
. The last dot means "Add every unstaged file to the stage." You can also specify which file to stage by typing its name. (Tip: You can start typing the file name and hit the tab key. It will automatically fills in what you were trying to type! You don't have to type a whole name, this is great!!) -
Commit the staged file into your local repository by typing
git commit -m "This is my first git practice"
. You can type whatever message you want, but don't forget-m
, which signifies a flag for message. -
Push the committed file onto your remote repository by typing
git push
. Check your GitHub repository page now and see if the new file is pushed!
Refer to the official documentation/guide for more!
I should be able to see your changes and decide whether I accept your change or not!