0% found this document useful (0 votes)
20 views

Git & Github

This document provides instructions for setting up Git and GitHub. It outlines the basic Git commands for cloning a remote repository, checking the status and committing changes, and pushing updates. It also covers commands for creating files and directories, renaming and deleting branches, and switching between branches in a local Git repository. The final commands push committed changes from a local branch to a remote repository on GitHub.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Git & Github

This document provides instructions for setting up Git and GitHub. It outlines the basic Git commands for cloning a remote repository, checking the status and committing changes, and pushing updates. It also covers commands for creating files and directories, renaming and deleting branches, and switching between branches in a local Git repository. The final commands push committed changes from a local branch to a remote repository on GitHub.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

GIT & GITHUB:

GIT SETUP:
git config --global user.name "surendraguna"
git config --global user.email "surendraguna2812@gmail.com"
git config –list

ls //list
ls -a // list hidden files

cd // change directory
cd .. // back one directory

git clone https link // Import Remote to Local


git status // cheak status

clear //clear screen


1. add
2. commit
3. push

git add <file name>


git add . // all files
git commit -m “MSG” // to commit
git push
git push origin main // main is branch

git init <folder name> // make folder


touch <filename.exe> // create a file
rm filename // remove file
rmdir folder name // remove folder
rm -r folder name // remove folder
mkdir directory name // create directory

git remote add origin http link // exist repo


git branch // get branch
git branch -M main // rename branch
git branch -d <- branch name -> // delete
git checkout <- branch name -> // to navigate
git cheakout -b <- new branch> // to create new branch
git remote get-url origin // get url origin
git config --global core.safecrlf false //
git checkout -b Master main // swift branch
git add .
git commit -M main
git push -u origin main

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy