Thursday, March 18, 2021

Git Commands [.gitignore file]


  1. cd to your working directory
  2. touch .gitignore : create a file called .gitignore 
  3. ls -a : view hidden file inside console
  4. open .gitignore : Open file and include the filename to be ignored
  5. git init : Initialised git   
  6. git status : to check what files are inside the staging area
  7. git add [filename.txt] : add files to the staging area
  8. git status : to check what files are inside the staging area
  9. git commit -m “initial files” : commit files in the version control  

Inside the .gitignore file
  • add files that wanna be ignored when adding and commit to git
  • # for commenting
  • *.txt : all the files with txt extension will be ignored


No comments:

Post a Comment