Git Commands With Examples | Top Git Commands with Examples | Git add, pull, branch, merge | Edureka

Поділитися
Вставка
  • Опубліковано 27 січ 2025

КОМЕНТАРІ • 74

  • @edurekaIN
    @edurekaIN  6 років тому +4

    Got a question on the topic? Please share it in the comment section below and our experts will answer it for you. For Edureka DevOps Training and Certification curriculum, Visit our Website: bit.ly/2O59dHy Use code "UA-cam20" to get Flat 20% off on this training.

  • @samuraijack2857
    @samuraijack2857 4 роки тому +106

    Git Commands
    00:17 git init
    01:49 git add
    03:24 git commit
    04:21 git status
    06:08 git config
    07:48 Intro to branching
    08:44 git branch
    08:56 creating a branch
    09:26 git checkout
    11:11 git merge
    11:45 Deleting branch
    12:06 git branch -d
    12:21 git branch -D
    12:50 git checkout -b
    14:03 git remote add origin : connecting local repo to remote repo
    14:53 Working with remote repos
    15:00 git remote
    15:13 git clone
    16:41 pulling changes, 17:17 git pull origin master
    17:50 pushing changes, 19:03 git push origin master
    19:41 Adv. git commands
    19:50 git stash, 20:50 git stash -u, 21:14 git stash list, 21:23 git stash show, 21:35 git stash apply
    21:59 git log
    24:09 git revert, 25:50 git revert HEAD
    27:19 git rebase

  • @jade7945
    @jade7945 4 роки тому +9

    you saved me, i was literally struggling ,,, d best video so far with right content.thankyou !

  • @j3dwin
    @j3dwin 5 років тому +13

    Great information! You went fast and that's good because you don't waste time and we can always go back if we missed something. Thank you.

  • @alonecutz6145
    @alonecutz6145 5 років тому +5

    The presentation was crystal clear and simpler. It will work for beginners as well as experienced ones. Thanks to the tutor and content creator.

  • @LoloLolo-vv2pv
    @LoloLolo-vv2pv 4 роки тому +3

    This Chanel made my life easier..... Thx a million... Love you all❤️

  • @sarathkumardv1274
    @sarathkumardv1274 2 роки тому +1

    Thanks for your efforts I enjoy lot of

  • @shabi12
    @shabi12 2 роки тому +2

    Very clear and precise explanation, and examples were just right for beginners and easy to follow.

    • @edurekaIN
      @edurekaIN  2 роки тому

      Good To know our videos are helping you learn better :) Stay connected with us and keep learning ! Do subscribe the channel for more updates : )

  • @Baloon_edits
    @Baloon_edits 4 роки тому +2

    Very professional and in less time with practice a layman can understand your this tutorial..hats off..

  • @MuhammadZubair-co5jl
    @MuhammadZubair-co5jl 2 роки тому

    Thanks for that much Information with examples.

    • @edurekaIN
      @edurekaIN  2 роки тому

      We are super happy that Edureka is helping you learn better. Your support means a lot to us and it motivated us to create even better learning content and courses experience for you . Do subscribe the channel for more updates : ) Hit the bell icon to never miss an update from our channel : )

  • @liyingfeng4247
    @liyingfeng4247 5 років тому +4

    I really appreciate this teacher's voice and speed and all the things she taught. Thanks a lot.

  • @theroyal1914
    @theroyal1914 4 роки тому +3

    i saw lots of tutorials but, all of them creating confusion but after this tutorial i understand all fundamentals with commands, thanks 🙃

  • @mearn_ctaftsman
    @mearn_ctaftsman 3 роки тому +1

    This is awesome 👍👍👍👍

  • @bhargavipolisetty222
    @bhargavipolisetty222 Рік тому

    Thank you so much! Best explanation I have ever heard, Keep doing this!!

    • @edurekaIN
      @edurekaIN  Рік тому

      You are welcome 😊 Glad it was helpful!! Keep learning with us ..

  • @bhagyashreejoshi3797
    @bhagyashreejoshi3797 2 роки тому +1

    This is great ...

  • @msbhargavi1846
    @msbhargavi1846 4 роки тому +2

    Really thankful to u guys...for me learning Java is easy thing compare to git, Before watching urs. now I understood very well

  • @asdfgh3098
    @asdfgh3098 3 роки тому

    Great information.
    Explained in a crisp manner..
    Excellent 👌👌👍👍

    • @edurekaIN
      @edurekaIN  3 роки тому +1

      Hey:) Thank you so much for your sweet words :) Really means a lot ! Glad to know that our content/courses is making you learn better :) Our team is striving hard to give the best content. Keep learning with us -Team Edureka :) Don't forget to like the video and share it with maximum people:) Do subscribe the channel:)

  • @NomadicDmitry
    @NomadicDmitry 3 роки тому

    Awesome video, knew almost everything, but haven't used "git stash" and "git rebase" much before.
    Thanks!

    • @edurekaIN
      @edurekaIN  3 роки тому

      We are super happy that Edureka is helping you learn better. Your support means a lot to us and it motivated us to create even better learning content and courses experience for you . Do subscribe the channel for more updates : ) Hit the bell icon to never miss an update from our channel : )

  • @gadgetboynaija
    @gadgetboynaija 5 років тому +1

    Why are Edureka videos always so good! You guys go in-depth in easy to undersatnd ways. Thank you!

    • @edurekaIN
      @edurekaIN  5 років тому +1

      Thanks! We are glad you feel this way. Do give this video a thumbs up and do consider subscribing to the channel for more amazing content. Cheers!

  • @kunaltijare8818
    @kunaltijare8818 5 років тому +2

    Thank You Edureka ...!

  • @prashanthreddy5546
    @prashanthreddy5546 2 роки тому +1

    In git config what is the difference by adding it git global and git locally (7.0 mins)

  • @ravisindhe
    @ravisindhe 4 роки тому

    Very Well explained.thankyou Master.

  • @CWNC
    @CWNC 5 років тому

    I enjoyed the pacing of the course and the clarity of the instructor.

  • @vinaykhurana9933
    @vinaykhurana9933 6 років тому +1

    Point to point and straight forward. Superb explanation. :)

    • @edurekaIN
      @edurekaIN  6 років тому

      Thanks for the compliment Vinay! We are glad you loved the video. Do subscribe to the channel an hit the bell icon to never miss an update from us in the future. Cheers!

  • @1CosmicKey
    @1CosmicKey 4 роки тому

    Fantastic job Sir. Thank you.

  • @mdmursalin7210
    @mdmursalin7210 4 роки тому

    thanku so much sir for big help

  • @logomoniclearning6680
    @logomoniclearning6680 5 років тому

    best git vid ive seen sofar

    • @edurekaIN
      @edurekaIN  5 років тому

      Thanks for the compliment! We are glad you loved the video. Do subscribe to the channel and hit the bell icon to never miss an update from us in the future. Cheers!😊

  • @ramkhadap9014
    @ramkhadap9014 7 років тому +1

    very good explanation....

  • @kumard-n9m
    @kumard-n9m 3 роки тому +1

    Super

  • @abhishekmen1
    @abhishekmen1 6 років тому

    Awesome tutorial. Sweet simple and short. All the best. Keep doing.

    • @edurekaIN
      @edurekaIN  6 років тому

      Hey Abhishek, we are glad you loved the video. Do subscribe and hit the bell icon to never miss an update from us in the future. Cheers!

  • @AnandMaurya0030
    @AnandMaurya0030 7 років тому +1

    Thanks for great explanation.

    • @edurekaIN
      @edurekaIN  7 років тому

      Thank you for watching our video. Do subscribe, like and share to stay connected with us. Cheers :)

  • @ratikadeshmukhr2772
    @ratikadeshmukhr2772 2 роки тому +1

    Good

  • @punkajjdaas4790
    @punkajjdaas4790 6 років тому +1

    I really liked the tutorial, and thanks for making it, i have a query ,what is HEAD, do all branches got HEAD, what is the rile of head?

    • @edurekaIN
      @edurekaIN  6 років тому +4

      Hey Baadhshah, A head is simply a reference to a commit object. Each head has a name (branch name or tag name, etc). By default, there is a head in every repository called master. A repository can contain any number of heads. At any given time, one head is selected as the “current head.” This head is aliased to HEAD, always in capitals".
      Note this difference: a “head” (lowercase) refers to any one of the named heads in the repository; “HEAD” (uppercase) refers exclusively to the currently active head. This distinction is used frequently in Git documentation.
      You can think of the HEAD as the "current branch". When you switch branches with git checkout, the HEAD revision changes to point to the tip of the new branch.
      You can see what HEAD points to by doing:
      cat .git/HEAD
      In our case, the output is:
      $ cat .git/HEAD
      ref: refs/heads/master
      Hope this helps :)

  • @pardhasaradhireddy6388
    @pardhasaradhireddy6388 6 років тому +1

    Dude, I am always happy with your Videos. Thanks Saurabh.

    • @edurekaIN
      @edurekaIN  6 років тому

      Hey Pradhasaradhi, thank you for being an avid learner with us. We are happy to serve people like you! Do check out our website and the courses we offer: www.edureka.co /all-courses
      Hope this helps :)

  • @nampallymahesh6474
    @nampallymahesh6474 3 роки тому

    Thanks edureka

    • @edurekaIN
      @edurekaIN  3 роки тому

      Happy to hear that!We are glad to have learners like you . Do subscribe our channel and hit that bell icon to never miss an video from our channel .

  • @proudindian3697
    @proudindian3697 6 років тому +1

    Fantastic video!! Thanks saurabh

    • @edurekaIN
      @edurekaIN  6 років тому

      Thank you for watching our video. Do subscribe, like and share to stay connected with us. Cheers :)

  • @pooransingh5802
    @pooransingh5802 4 роки тому

    is it better to push changes directly into master branch ?

    • @edurekaIN
      @edurekaIN  4 роки тому

      For learning purposes, yes. However, in a professional environment it will depend upon other factors.

  • @sureshkarki2174
    @sureshkarki2174 5 років тому

    what if I want to push to files from local to a remote branch. how do I do it..?

    • @edurekaIN
      @edurekaIN  4 роки тому

      Create a new branch: git checkout -b feature_branch_name.
      Edit, add and commit your files.
      Push your branch to the remote repository: git push -u origin feature_branch_name.

  • @NadeemAhmed-oi1qj
    @NadeemAhmed-oi1qj 5 років тому +2

    Awesome explanation (y)

  • @dhavalshah3519
    @dhavalshah3519 5 років тому

    Explained beautifully

  • @sakshibag1479
    @sakshibag1479 4 роки тому

    Very nice video. During revert , I get this error
    git revert 1873eaf
    error: Reverting is not possible because you have unmerged files.
    hint: Fix them up in the work tree, and then use 'git add/rm '
    hint: as appropriate to mark resolution and make a commit.
    fatal: revert failed
    I have only one master branch
    Please help

    • @edurekaIN
      @edurekaIN  4 роки тому +1

      Hi Sakshi, It is a merge conflict from some merge you attempted before. The unmerged files are the files where the merge conflict happened. As stated in the error message, you should take care of these files and the contained conflicts before you do anything else. One additional option is to do a hard reset - only attempt this if you know what you're doing.

  • @pankajbarge3297
    @pankajbarge3297 6 років тому +3

    saurav you are explaining very short and quickly ..... please illabrate slowly

    • @edurekaIN
      @edurekaIN  6 років тому +1

      Hey Pankaj, thank you for the feedback. We will definitely work on it. We hope to see you on our channel again! Cheers :)

  • @alexgathuri9349
    @alexgathuri9349 4 роки тому

    how do i change branch from main to master?

    • @edurekaIN
      @edurekaIN  4 роки тому

      Hi Alex, you can use the git checkout command to switch branches. Cheers :)

  • @bhavnavharitsa7653
    @bhavnavharitsa7653 6 років тому

    why do you give "touch " before creating a file and " gedit " before pushing it

    • @edurekaIN
      @edurekaIN  6 років тому +1

      Hey Bhavna, touch: creates the file Geddit: edits the file. Hope this helps!

  • @krishsnewera
    @krishsnewera 3 роки тому

    Git Repository link ??

    • @edurekaIN
      @edurekaIN  3 роки тому

      Hey Chaihanya ! Check this out might help you : ua-cam.com/video/xuB1Id2Wxak/v-deo.html :)
      Do subscribe the channel to get regular updates !

  • @udaybhaskarnamburu7272
    @udaybhaskarnamburu7272 4 роки тому

    How to compare a modified file with it's previous commit and make sure that I am committing the correct changes? As developers, we tend to add debug and log statements during the development process and we don't need them in the production code.

    • @edurekaIN
      @edurekaIN  4 роки тому

      Hi Uday, You can use the git diff command for this.

  • @saikumar-bx7pi
    @saikumar-bx7pi 3 роки тому

    Bro, I got the JOB with 2.5 Years(JAVA) Experience, But I Don't know Real Time Work Experience, Can you Please Suggest me How can I Continue With my JOB?

  • @elyordoniyor4061
    @elyordoniyor4061 4 роки тому

    🖒👍

  • @MuniemSpeaks
    @MuniemSpeaks 2 роки тому +1

    When I am writing this command [training@localhost ~]$ git add eduraka.py It is showing me that bash: git: command not found...
    How to deal with this???

  • @ferozazad8933
    @ferozazad8933 2 роки тому +1

    Im not getting command gedit edureka.py >> getting error [bash: gedit: command not found]

  • @mash4077ist
    @mash4077ist 2 роки тому +1

    Super