It's UWAweek 19

helpOSTS

This forum is provided to promote discussion amongst students enrolled in Open Source Tools and Scripting.

Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

How do I ask a good question?
Displaying selected article
Showing 1 of 411 articles.
Currently 18 other people reading this forum.


SVG not supported

Login to reply

👍?
helpful
12:07pm Mon 1st May, Daniel S.

After the git lecture, I had a student ask about the difference between git checkout and git switch.

Git checkout is a powerful command. As per the slides, it allows you to do two things:

  1. Restore a file from a different branch or commit: git checkout my-branchname my_file.txt
  2. Switch to a different branch or commit: git checkout my-branchname

You can even add the -b flag in the second case to create a branch before you switch to it!

Packing two quite different functions into a single command is confusing. Thus, git restore and git switch have been created to split up the functionality of git checkout.

https://stackoverflow.com/questions/57265785/whats-the-difference-between-git-switch-and-git-checkout-branch

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  8:08AM Aug 25 2024
Privacy policy