Skip to content

Latest commit

 

History

History
116 lines (72 loc) · 1.85 KB

File metadata and controls

116 lines (72 loc) · 1.85 KB

git-tutorial

repository for git tutorial

git remove remote folder

  1. remove folder and commit
  2. push to remote folder

switch to remote branch

  • git checkout --track origin/daves_branch

branching

git checkout -b "iss1" 5773
git checkout -d "iss1"
git branch -a

git fetch

git fetch --all git checkout origin/homeuse git branch -b "iss1" git checkout "homeuse" git merge "iss1"

add origin

git remote add origin git://github.com/ling910520/file-monitoring git push - u origin master

resync with sources:

git fetch
git reset --hard origin/master

tracked newly created remote branch

git checkout --track origin/test1

Changing the Last Commit:

git commit --amend --no-edit

git rebase

git rebase master git rebase --continue

git delete remote branch

git push -d origin test1

git push branch to origin

  • git push origin testfa
  • git push --set-upstream origin testing-file

view merge conflict

  • git status

clone without create a new folder

  • git clone <repo_url> .

reset url origin

Please commit your changes or stash them before you switch branches.

git reset --hard

Checkout

git checkout --orphan latest_branch

Add all the files

git add -A

Commit the changes

git commit -am "commit message"

Delete the branch

git branch -D master

Rename the current branch to master

git branch -m master

Finally, force update your repository

git push -f origin master

PS: this will not keep your old commit history a

Untrack files already added to git repository based on .gitignore

git rm -r --cached .
git add .
git commit -m ".gitignore fix"

git delete remote tag

-> git push tags to remote origin

git push origin <tag_name>

git push --tags

-> delete remote tag

git push --delete origin simplify_event_config