- cd to your working directory
- touch .gitignore : create a file called .gitignore
- ls -a : view hidden file inside console
- open .gitignore : Open file and include the filename to be ignored
- git init : Initialised git
- git status : to check what files are inside the staging area
- git add [filename.txt] : add files to the staging area
- git status : to check what files are inside the staging area
- 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