I have been using GIT for more than 5 years now. I used GUI based software for cloning, committing, etc. tasks all these years. But with my current job which I joined a year ago, I have been using command line. I keep forgetting some of the commands and have to keeping searching the web. Today I thought I should probably make a note for myself here.
Check what files changed; i.e. modified, added or removed.
Commit changes to Git. i.e. modified files, new files and removed files.
git add < file name with extension >
git commit -m " message you want to add to the commit "
Push changes to remote repository etc.
Show all the branches on your local.
Adding existing source code files to the newly created repository.
git add . Use . (dot) or * (asterisk) for adding all files.
git add < file name > Provide file name for adding single file
git commit -m "This will be my message to the commit."
git remote add origin < URL to the remote repository >
git push –u origin --all