By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
rocoderesrocoderes
  • Home
  • HTML & CSS
    • Login and Registration Form
    • Card Design
    • Loader
  • JavaScript
  • Python
  • Internet
  • Landing Pages
  • Tools
    • Google Drive Direct Download Link Generator
    • Word Count
  • Games
    • House Painter
Notification Show More
Latest News
How to set the dropdown value by clicking on a table row
Javascript – How to set the dropdown value by clicking on a table row
JavaScript
Attempting to increase the counter, when the object's tag exist
Javascript – Attempting to increase the counter, when the object’s tag exist
JavaScript
Cycle2 JS center active slide
Javascript – Cycle2 JS center active slide
JavaScript
Can import all THREE.js post processing modules as ES6 modules except OutputPass
Javascript – Can import all THREE.js post processing modules as ES6 modules except OutputPass
JavaScript
How to return closest match for an array in Google Sheets Appscript
Javascript – How to return closest match for an array in Google Sheets Appscript
JavaScript
Aa
Aa
rocoderesrocoderes
Search
  • Home
  • HTML & CSS
    • Login and Registration Form
    • Card Design
    • Loader
  • JavaScript
  • Python
  • Internet
  • Landing Pages
  • Tools
    • Google Drive Direct Download Link Generator
    • Word Count
  • Games
    • House Painter
Follow US
High Quality Design Resources for Free.
rocoderes > Internet > Which Are Basic Git Commands? It’s Function
Internet

Which Are Basic Git Commands? It’s Function

Admin
Last updated: 2022/11/24 at 4:24 AM
Admin
Share
2 Min Read
basic git commands
basic git commands

In this topic, you will get familiar with some basic Git commands. At the end of this topic, you will be able to.

Contents
Basic Git CommandsInitializing the folder as a Git repositorygit initChecking your Git repository statusgit statusAdding files to the staging areagit add .Committing to the Git repositorygit commit -m “first commit”Checking the log of Git commitsgit log –onelineResetting the Git repositorygit reset HEAD index.html

1) set up a folder as a Git repository.

2) Perform basics git operations on your Git repository.

Basic Git Commands

1) At a convenient location on your computer, create a folder named git-test.

2) Open this git-test folder in your favorite editor.

3) Create an index.html file and add some code.

Initializing the folder as a Git repository

1) Go to the git-test folder in your cmd window/terminal and type the following at  the prompt to initialize the folder as a Git repository:





git init

Checking your Git repository status

Type the following at the prompt to check your Git repository’s status:





git status

Adding files to the staging area

To add files to the staging area of your Git repository, type:





git add .

Committing to the Git repository

To commit the current staging area to your Git repository, type:





git commit -m “first commit”

Checking the log of Git commits

To check the log of the commits to your Git repository, type

git log –oneline

Resetting the Git repository

To discard the effect of the previous operation and restore index.html, type:

git reset HEAD index.html

Related

Subscribe to Our Newsletter

Subscribe to our newsletter to get our newest articles instantly!

TAGGED: basic git commands
Share this Article
Facebook Twitter Email Print
What do you think?
Love1
Sad0
Happy0
Sleepy0
Angry0
Dead0
Wink0
Posted by Admin
Follow:
Rocoderes is a blog you can learn HTML, CSS, JavaScript, React Js and Python along with creative coding stuff and free source code files.
Previous Article Countdown Calendar using Python Tkinter How to Make Countdown Calendar using Python Tkinter
Next Article variables and values in javascript What are Variables And Values in JavaScript
Leave a comment Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

- Advertisement -

You Might Also Like

MilesWeb Review: Understand How Dedicated Server Hosting Works with Them

MilesWeb Review: Understand How Dedicated Server Hosting Works with Them

December 28, 2022
MilesWeb Review: Is VPS Hosting from Them Best for Increasing Site Speed?

MilesWeb Review: Is VPS Hosting from Them Best for Increasing Site Speed?

December 28, 2022
what is a proxy server

What Is A Proxy Server? How Proxy Server Works? Complete Guide

May 29, 2022
rocoderesrocoderes
Follow US

Copyright © 2022 All Right Reserved By Rocoderes

  • Home
  • About us
  • Contact us
  • Disclaimer
Join Us!

Subscribe to our newsletter and never miss our latest news, podcasts etc.

Zero spam, Unsubscribe at any time.
Welcome Back!

Sign in to your account

Lost your password?