Git & GitHub is A Version Control for beginners and experts
Git and GitHub are two technologies that every developer should learn, irrespective of their field.
If you're a beginner developer, you might think that these two terms mean the same thing โ but they're different.
Prerequisites In order to complete this tutorial, you'll need the following:
- A Command Interface like cmd
- A Text Editor of your choice (I Will use Visual Studio Code)
- A GitHub account.
PermalinkWhat is Git ?
What is Git? Git is a version control system which lets you track changes you make to your files over time. With Git, you can revert to various states of your files (like a time traveling machine). You can also make a copy of your file, make changes to that copy, and then merge these changes to the original copy.
For example, you could be working on a website's landing page and discover that you do not like the navigation bar. But at the same time, you might not want to start altering its components because it might get worse.
With Git, you can create an identical copy of that file and play around with the navigation bar. Then, when you are satisfied with your changes, you can merge the copy to the original file.
You are not limited to using Git just for source code files โ you can also use it to keep track of text files or even images. This means that Git is not just for developers โ anyone can find it helpful.
PermalinkInstalling Git
In order to use Git, you have to install it on your computer. To do this, you can download the latest version on the official website. You can download for your operating system from the options given.
You can also install Git using the command line, but since the commands vary with each operating system, we'll focus on the more general approach.
PermalinkConfigure Git
I will assume that at this point you have installed Git. To verify this, you can run this command on the command line: git --version
. This shows you the current version installed on you PC.
PermalinkLogin To GitHub
If you have The Account before, Go to this Section
- Go to GitHub Official Site
- Write Your Information โน
Congrats Your GitHub Account Created Successfully ๐
PermalinkLogin To Git
The next thing you'll need to do is to set your username and email address. Git will use this information to identify who made specific changes to files.
To set your username, type and execute these commands: git config --global user.name "YOUR_USERNAME" and git config --global user.email "YOUR_EMAIL". Just make sure to replace "YOUR_USERNAME" and "YOUR_EMAIL" with the values you choose.
PermalinkInitialize Your First Project
We are finally done with installing and setting up Git. It is now time to create our project.
- Create A Folder for Your Project
- Go to the bar in the top and write
cmd
โ:
- A Window will opened like this:
- Write in this command prompt
git init
to Initialize New Git Repository:
- New Folder in Your Project Created Called
.git
PermalinkNow Create Your Files in your project
If you want to Create A Website create all files like index.html, Images Folder, style.css(main.css), Main.js and etc...
PermalinkPublish Your Repository on GitHub
If you don't have an account in GitHub Go to this section
- You can click on the
+
symbol on the top right corner of the page then choose "New repository".
- Give your repo a name then scroll down and click on "Create repository".
Give the repository name Don't Choice anything click on
Create Repository
Let's Copy This Commands and paste it in our command line:
- Go to the command line and commit our files
- Write in the command line
git add .
- Write in the command line
git commit -m "Git Tutorial"
- Write in the command line
git push
Now go to Your Repository and refresh it Now your files you are push it Successfully pushed and Your Code in the web
Now if you want to host your site in github go and see this video
PermalinkThank you for reading ๐ ๐๐
Permalink๐ Find me at:
Subscribe to our newsletter
Read articles from Programming School directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Article Series
Web Developer
Full Stack Framework for Next JS Setup
The T3 Stack The โT3 Stackโ is a web development stack made by Theoโ focused on simplicity, modulariโฆ
The Best Portfolio And Blogs Websites 2022
React Framework Portfolios Developer Portfolio Preview Code Developed By Programming School Awesoโฆ
Deploy an app on vercel
Hello How are you today ? Create A Vercel Account at vercel.com Then Create A New Project Choose yโฆ
How to Make Auto Typing in React or Next JS ?
Hello Everyone in a new article ๐ In this article we will Make A Auto Typing Effect with A Packageโฆ
Learn Git & GitHub
Git & GitHub is A Version Control for beginners and experts Git and GitHub are two technologies thaโฆ
All Html Tags, All Picture resources, All Photo Editors, Code Editors
All Resources I make the Blog from it haikei Icons8 Html tags FlatIcon svgrepo WallpaperCave Splineโฆ
Navbar with flexbox
Hello ๐ Today we will create a responsive navigation bar with flexbox Create Files Create a newโฆ
Learn CSS and its Syntax
Hello All ๐ Today We will learn CSS Syntax CSS Definition Cascading Style Sheets, fondly referred tโฆ
Learn Html, Create Your First Html Web page
Hello We will learn About Html HTML (hypertext markup language) is the Building language of the inteโฆ
17 best UI/UX design tools
17 best UI/UX design tools 17 useful tools for UI/UX designers In this list, the first 11 tools mentโฆ
Auto Type
![channels4_profile.jpg] (https://cdn.hashnode.com/res/hashnode/image/upload/v1641057637283/vpZGPiOโฆ