• Skip to main content
  • Skip to primary sidebar

Web Development Archive

  • Archive
You are here: Home / Other / Git Commands

Git Commands

Main lehúzása és merge-elése saját branch-be

git pull origin main
  • A felkiáltójel a branch végén (!) → azt jelzi, hogy a branch nincs szinkronban a remote-tal (tipikusan van rajta olyan commit, amit még nem toltál fel, vagy épp rebase közben van). Ez egy figyelmeztetés, nem hiba.
  • A (Rebasing) felirat → azt jelenti, hogy épp egy git rebase művelet van folyamatban. A Git ilyenkor lépésről lépésre “újrajátssza” a commitjaidat egy másik bázisra.
    • Ha minden tiszta, automatikusan végigmegy.
    • Ha ütközés van, meg kell oldanod, majd git rebase --continue.
    • Ha mégsem akarod, git rebase --abort.

Personal Access Token

git pull
username
password

Visszaállítja a munkakönyvtár összes fájlját az utolsó commit állapotára

git checkout -- .

Delete local branch

git branch -d branch_name
git branch -D branch_name

A -d opció csak akkor törli a branch-et, ha az már be lett mergelve a jelenlegi branch-be, míg a -D opció erőltetetten törli, függetlenül attól, hogy be lett-e mergelve.

Delete remote branch

git push origin --delete branch_name

Re-Push all files to repository

git commit --allow-empty -m "Trigger deployment"
git push origin main # vagy az aktuális branch

Stash

git stash
git stash save 'comment example'
git stash list
git stash apply
git stash apply stash@{n}
git stash drop stash@{n}
git stash clear

Merge

git checkout dev
git pull
git checkout <sajat branch-em>
git merge dev

Vim Commit

  • Írd be az üzenetet:
Merge dev branch into feature/HKD-674
  • Nyomd meg Esc.
  • Írd be :wq és nyomj Enter.

Ezek után a merge commit el fog készülni, és tovább tudsz lépni a fejlesztésben.

Git rebase

git checkout develop
git pull
git checkout branch-name
git rebase develop
git push origin +branch-name

Discard all

git reset --hard

Disconnect remote repo

git remote rm origin

Filed Under: Other

About Gabor Flamich

I'm a web developer and designer based in Budapest, Hungary. In recent years, I've documented hundreds of solutions I came across during development. This site is an archive for useful code snippets on WordPress, Genesis Framework and WooCommerce. If You have any questions related to WordPress development, get in touch!

Primary Sidebar

  • angular.io
© 2026 WP Flames - All Right Reserved