Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/abdulshaikh55/local-file-git


https://github.com/abdulshaikh55/local-file-git

Last synced: 24 days ago
JSON representation

Awesome Lists containing this project

README

        

to make this a git file use the term `git init`.

then track them using `git add .`.

then see the status using `git status`.

then commit using `git commit -m "create README.md`.

then create a repo in git hub with the name local-file-git

since, local file is `master` and remote branch is `main` by default, change branch name of local file

change branch name: `git branch -M main`

check the branch name: `git branch`

then copy the ssh and paste it at : `git remote add origin `

then push the file using `git push orign main` || `git push origin `

or `git push -u orign main` || `git push -u origin `

## Branches in git
1. To create a new branch use, `git checkout -b `
2. To check which branch you are on, use `git branch`
3. To switch brances, use `git checkout `
4. After adding, committing the new branch, push it using `git push origin `
5. create pull request on github an merge it.
6. You will notice after switching to master branch in your local file, that the changes do not appear.
7. To resolve that, use `git pull`
8. to delete the side branch, use `git branch -d `