Simple view of add file into git repository

DevOps

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

How to add File in Git repositery or import project into Git ?

  • Install Git, use git-bash and goto git directory into git-bash by:
    • $ cd c:/git
  • Now open ‘Git-hub’ in browser or software and just create a ‘new’ repository by clicking create repository with new repository name. you can add readme file. This ‘repository folder’ is to be showing on git directory.
    • github/login
  • Now open git-base and enter the two commands one by on:
$ git config --global user.name "your-name"
$ git config --global user.email "your-mail"
  • Now copy the path of “url” of repository from github and paste with command:
$ git clone your_url
  • Now the repo clone file copied in your git directory, you can see by ls command:
$ ls
  • Now the repo clone file copied in your git directory, you can see by ls command:
$ git add your_file
  • And check it status by:
$ git status
  • When you want to commit file in your git, you just enter the command:
$ git commit -m "commit" your_file
  • At the end, complete object set up by the command:
$ git push -u origin main

Finally, we commit the files into your repository, this is basic view of git repository.