Skip to content

jon-michael-c/HowToUseGit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

How to use Git via Terminal

NOTE: I am aware that Git works on CMD in Windows, but I choose to use git-scm because it has a nice feature where you can open the terminal in any directory by right clicking.

In order to use Git, you must be able to push and pull from either a GUI or a terminal based client. My example will use the terminal. I downloaded Git for Windows at https://git-scm.com/ which I installed on my PC. image

I created a repository on github.com and created the repository with this README.MD file. I then cloned the repository by running the command git clone https://github.com/vincentmsinatra/CISC3140.git in my Git terminal.

image

I then ran the command cd to move me into the directory of the repository that I had just cloned

image

I intitalized my Git repository using the git init command

image

Furthermore, I ran the command git add File.txt to add my text file that includes a few lines of text.

image

I will now run git commit -m "First Commit" to commit changes in the repository with the comment "First Commit"

image

I then set the origin of the repository to the repositories URL

image

Lastly, I ran the command git push -u origin to push the file FILE.txt to the repo.

image

The original file reads "I am a file. I store Unicode characters as data." as seen below.

image

I edited the file to include another line.

image

I will now add and push the file along with this README.md file.

image

We are now done.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors