0% found this document useful (0 votes)
108 views2 pages

Github Notes

The document provides instructions for basic Git commands used to initialize a Git repository, commit changes, work with branches, and push/pull from a remote repository. It covers initializing and configuring a local repository, making commits, cloning a repository from GitHub, viewing commit logs and status, creating and switching branches, stashing changes, merging branches, and adding/interacting with a remote repository on GitHub.

Uploaded by

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

Github Notes

The document provides instructions for basic Git commands used to initialize a Git repository, commit changes, work with branches, and push/pull from a remote repository. It covers initializing and configuring a local repository, making commits, cloning a repository from GitHub, viewing commit logs and status, creating and switching branches, stashing changes, merging branches, and adding/interacting with a remote repository on GitHub.

Uploaded by

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

Chapter1:

$ git config --global user.name �John Doe�


$ git config --global user.email �john@doe.org�
$ git config --global color.ui auto

$ cd <path/to/project/folder>
$ git init

$ ls -la

git add -A
$ git commit -m �Initial commit"

$ cd your/development/folder/
$ git clone https://github.com/gittower/git-crash-course.git

$ git status

$ git add new-page.html index.html css/*

$ git commit -m �Implement the new login box�

$ git log

==========Chapter2
$ git branch contact-form

$ git branch -v

$ git status

$ git stash

$ git status

$ git stash list

$ git checkout contact-form

$ git add contact.html

$ git commit -m "Add new contact form"

$ git log

$ git checkout master


$ git log

$ git checkout master


$ git merge contact-form

$ git log

=================Chapter#3
$ git remote add origin https://github.com/EnggQasim/test1.git

$ git remote -v

$ git branch -va


$ git fetch origin master

$ git fetch origin


$ git log origin/master

$ git pull

$ git checkout <branchName>

$ git push -u origin <branchName>

$ git branch -vva

$ git branch -d <branchName>

$ git branch -dr origin/<branchName>

git remote add origin


git remote add origin <"clone"> -f
git push origin master OR git push origin master -f
git clone repoName
git pull origin master

git push -u origin <branch> -f (push local brach on server)


git push --all -u (push all things on remote server)
git pull --all (pull all data from server)

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