OOP344 – Lecture & Week #2

This week in OOP344 we did:

– Retrieval of Wiki credentials

– GitHub Review & Commands

So the first topics I’m gonna cover in this post are the github commands:

1) git branch: Shows the current branch you are in.

2) git checkout – – <file_name> : Removes changes to a file.

3) git status: Checks for changes in a file or repo.

4) git checkout <branch_name>: Switch to specified branch.

5) git add: Adds files to a branch (current branch).

6) git commit – -help: Online/Offline help pertaining to git commit commands.

7) git config: Used to configure authors and emails pertaining to your account.

8) git branch -d <branch_name>: Deletes the specified branch.

9) git branch -b <branch_name>: Creates and switches to your new branch within 1 command.

10) git commit -m “Message”: To commit and add a message rather than create a file containing the commit message. This method is faster and much easier to use since all the work is done through the command itself.

11) git add -u: To add all modified files rather than typing out their entire name. This method, like the last, is simpler and faster because all the work to be done is being done within the command itself.

Another topic we covered pertaining to git commands include “Adding a new file to a branch”

1st step: git checkout <branch_name> ->switch to your desired branch

2nd step: git add <file_path> -> add the file into the branch repo

3rd step: git commit -m “Message” -> commit the file and include the message pertaining to the changes made to that file

4th step: git status -> this will check the status on all commits made.

So thats pretty much everything we covered in our first official lecture of OOP344.

Feel free to comment any other commands you may know of!!!!!!