« Git avancé et crée des alias git » Réponse de code

Git avancé et créez des alias git
git config --global alias.ac "commit -am"
# git commit -am "testing" //add and commit the code
git ac "testing" //do the same

git commit --amend -m "nice" // will amend the latest commit msg
git log --graph --onlinbe --decorate // will show the commit log in nice way
git bisect start
git bisect bad // find teh healthy branch and work from there
git squash

// technique to reset your local master/feature as smae as//
//the remote main
1.git fetch origin // you fetch the latest
2.git reset --hard origin/master // you reset you local as the remote
//and your , also notice that your changes will be lost
3.git clean -df //to clean untraclked files, artifact and such things
//if you switch out of a branch and want to gon back to it but you forgot its name 
// just use the below command to switch back to it
git checkout -
  // commit patch on the file/ part of all the changes of that file
 git add -p file_name // then git will walk you through
  //if you are on github and want to make changes on the repo
 1. gott you the repo yiu want to work on
 2. on you kepboard, click '.' and a new window of your browser will open with vs code 
  // checkout this toturial 
  // https://www.youtube.com/watch?v=Uszj_k0DGsg

Laisser un commentaire