powerpoint presentation€¦ · $ git init $ git add $ git status $ git commit $ git push $ git...

Post on 13-Jun-2020

120 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

$ git init

$ git add <file>

$ git status

$ git commit

$ git push

$ git pull

$ git clone

••

••

••

$ sudo apt-get install git

$ sudo yum install git

$ git --version

$ git config --global user.name "John Doe"$ git config --global user.email johndoe@example.com$ git config --list

$ cd /home/user/my_project

$ git init

$ git add .

$ git commit -m "Initial Commit"

$ git status

$ git status

$ git add .$ git commit -m "Readme file added"

$ touch log.txt$ git status

$ touch .gitignore

$ git remote add origin {repo URL}$ git push -u origin master

$ git pull {name | origin} {branch name | master}

$ sudo apt-get install git

$ git config --global user.name "John Doe"$ git config --global user.email johndoe@example.com

$ mkdir -p /home/<user>/git/playground$ cd /home/<user>/git/playground$ git clone {repo url}

$ git add -A$ git commit -m "Commit from server"$ git push origin master

$ git pull

$ git branch

$ git branch <branch>

$ git branch -d <branch>

$ git branch -D <branch>

$ git branch -m <branch>

$ git branch -a

$ git branch crazy-experiment

$ git checkout crazy-experiment

# Add remote repo to local repo config$ git remote add new-remote-repo https://github.com/user/repo.git

# pushes the crazy-experiment branch to new-remote-repo$ git push <new-remote-repo> crazy-experiment~

$ git branch -d crazy-experiment

error: The branch 'crazy-experiment' is not fully merged.If you are sure you want to delete it, run 'git branch -D crazy-experiment'.

$ git branch -D crazy-experiment

$ git push origin --delete crazy-experiment

$ git push origin :crazy-experiment

top related