Understanding GIT Bash

In this article we will learn about Git Bash. Bash is an acronym of Born against shell. I have just started using this in my current project and have been moved to Devops part.

Understanding GIT Bash

GIT Bash is used by multiple developers/ testers to share their code with each other after multiple revisions. This is very useful if your project size is bigger and multiple people are working in the same project. You can push and pull the Github/ gitlab repositories using Git Bash easily.

Common Commands in GIT Bash

  • List Command - ls
    • in table format - ls -l
    • to view hidden files - ls -la
  • Change directory - cd
    • cd moves you to your root folder
    • cd abc moves you to abc folder
  • Clear page - clear
  • Exit - exit
  • Make Directory - mkdir "folder name"
    • Example - mkdir "01.Sample"
  • Remove directory - rmdir / rm - rf "folder name"
    • Example - rmdir 01 + click TAB
  • Create new file - touch + extension
    • Example - touch sample.txt
        • touch sample.pptx
        • touch sample.xlsx
  • Remove file - rm "file name"
  • Editing files - nano "file name" + extension
  • pwd - print path of current directory
  • .
  • ..
  • Tab - autocomplete the command
  • > - write to the file
  • >> - append to the file
  • Cat - list contents of the file
That's all the basic commands.

Comments

Post a Comment

Popular posts from this blog

Azure Tutorials Series - Azure Networking

Testing in CI/CD

Azure Tutorials Series - IaaS vs PaaS vs SaaS