[go: up one dir, main page]

0% found this document useful (0 votes)
41 views1 page

Git Commands

This document outlines various Git commands for configuration, initialization, editing and committing files, viewing changes, and pushing and pulling from a remote repository. It shows how to set up user information, initialize a local repository, add and commit files, view diffs between commits, and push/pull from GitHub.

Uploaded by

Sudarvizhi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views1 page

Git Commands

This document outlines various Git commands for configuration, initialization, editing and committing files, viewing changes, and pushing and pulling from a remote repository. It shows how to set up user information, initialize a local repository, add and commit files, view diffs between commits, and push/pull from GitHub.

Uploaded by

Sudarvizhi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Git commands

Configuration::
$ git config --global user.name "Gopinath Jayakumar"
$ git config --global user.email "gopirandom@gmail.com"
$ git config --list
$ clear
$ git config user.name
$ pwd
$ cd ~
$ cd ..
$ cd gopi
$ ls

$ touch .gitignore

Initialization::
$ git init
$ ls
$ ls -la
$ git add .
$ git commit -m "this is our project"
$ git log
$ git log --username = "Gopinath Jayakumar"
$ git status

Edit Commit file::


$ git status
$ git add first.txt
$ git status
$ git commit -m "Modified the first file"
$ git status

View Changes Mode::(comparing two file)


$ git status
$ git diff
$ git diff -staged
$ git commit -m "third diff"
$ git status

Push
$ git remote add POM https://github.com/GopinathJayakumar/Bluntli.git
$ git push -u POM master

pull

$ git remote add dest https://github.com/GopinathJayakumar/Bluntli.git


$ git pull dest master

You might also like