Skip to content

Carmela0501/intro-git

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

{ Git }

Here are questions for you to assimilate the concepts we went through in class 💪

Instructions:

  • Answer each question with a short sentence and/or a command (depending on the question).
  • Replace "# Your answer goes here" with the answer.

    ➡️ For this you will have to modify this README.md file

  • Once you are done, use your newly acquired git knowledge to submit this homework from the CodeSpace terminal

    hint: use add, commit and push - if you do not find out how to do it it's okay, just ask your peers!

Navigating the terminal

  • What is a root directory?
# Your answer goes here
  • What is the difference between root and home directory?
# Your answer goes here
  • What is the difference between absolute and relative path?
# Your answer goes here
  • What command do you use to see what directory are you currently in?
# Your answer goes here
  • How would you see the files and folders in a directory?
# Your answer goes here
  • How do you go back to your home directory?
# Your answer goes here
  • How do you create a new folder? Specify in the command where you want to save it.
# Your answer goes here
  • How do you remove a folder/directory, is it the same as removing a file?
# Your answer goes here
  • What if a file or folder is not empty? What flag would you use to remove it anyway?
# Your answer goes here
  • How do you move a folder/file? What arguments does the command take?
# Your answer goes here
  • How can you find out more about a command and see the available options, syntax etc. How/Where do you see the manual/help for a command?
# Your answer goes here
  • With what command do you rename a folder/file in the command line?
# Your answer goes here
  • How do you copy a folder?
# Your answer goes here
  • What command do you use to open a folder/file?
# Your answer goes here

Creating a new project

  • How do you create a new folder (what command)?
# Your answer goes here
  • What command do you use to create/initiate a local repository (from the command line)?
# Your answer goes here
  • What command do you use to create a new file?
# Your answer goes here
  • If you create a file and and add text to it, these changes are now on your working directory. How would you save these to the local repository (add the commands for both steps)
# 1. From the working directory to the staging area:

  # Your answer goes here
  
# 2. From the staging area to local repository

  # Your answer goes here
  
  • What does git status do?
# Your answer goes here
  • How would you check your commit history?
# Your answer goes here
  • To share your project(folder), you will need to create a remote repository. This can be done either on Github or in the command line using "gh repo create" command. To connect your local repository to the remote one (if you were to create it on github) you need to add remote to it. What command do you use to add the remote
# Your answer goes here
  • How do you check whether you already have some github/remote repository connected to your local one?
# Your answer goes here
  • When local and remote repository are connected, one can push the changes/files so they are visible on github. What would the command be?
# Your answer goes here

Working on an existing project

  • Do you need to initiate a git repository after cloning a project?
# Your answer goes here
  • What is the difference between forking and cloning?
# Your answer goes here
  • Can you just push your changes to repository that you don't "own" on github?
# Your answer goes here

About

Git challenge: can you answer these questions?

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors