how can i push this modified file in github
% git status
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working
# directory)
# modified: login.php
no changes added to commit (use "git add" and/or "git commit -a")
On GitHub.com, navigate to the main page of the repository. Above the list of files, using the Add file drop-down, click Upload files. Drag and drop the file or folder you'd like to upload to your repository onto the file tree.
Enter git add --all at the command line prompt in your local project directory to add the files or changes to the repository. Enter git status to see the changes to be committed. Enter git commit -m '<commit_message>' at the command line to commit new files/changes to the local repository.
git status
It will show you all modified file and new file in working tree
modified: file path
Untracked files: that are not tracked by Git
For adding Untracked files
git add <file path>
after adding file you need to commit
git commit -m "< your message>"
For committing only modified file
git commit -m "<your message>" <file_path 1> <file_path2>
Pushing code to git
git push <origin> <branch_name>
Update remote refs along with associated objects
For more details read documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With