add local folder to git repo 1

add local folder to git repo

git init
git add .
git commit -m "First commit"
git remote add origin 
git remote -v
git push origin master

Here is what the above code is Doing:
1. git init: Initializes a git repository in the current directory.
2. git add .: Adds all files in the current directory to the repository.
3. git commit -m “First commit”: Commits the files that you’ve added with a message.
4. git remote add origin : Sets the new remote.
5. git remote -v: Verifies the new remote URL.
6. git push origin master: Pushes the changes in your local repository up to the remote repository you specified as the origin.

Similar Posts