next thing would be to commit using and then push to what ever branch you want to push

git commit -m 'Some message about the change'

git push origin 'branch-name'
Answer from Shani on Stack Overflow
Discussions

Pushing to GitHub via the terminal
Here's where to start reading about git: https://www.git-scm.com/doc . From the Pro Git book to the reference manual, it's the site that will be your best git friend from the first day and through the most complex problems and advanced usage. More on reddit.com
🌐 r/git
15
0
March 31, 2023
how to commit and push using cli ?
how to commit and push using cli ? cant seem to find the command in the manula More on github.com
🌐 github.com
2
1
March 6, 2021
Do you add commit push after you push?
With push you put your latest commit and all commits before that on the server (GitHub, BitBucket, GitLab, or anything else). In that way you can share the changes you made with others, and make sure they're backed up. You don't have to push after each commit. As I mention before, when you push, you send your latest and all earlier commits that the server doesn't have in the current branch. My workflow generally is that I add and commit multiple times, and only push data to the server once in a while, e.g. before lunch and when I stop working. More on reddit.com
🌐 r/git
16
3
July 29, 2021
Whats the purpose of a git commit VS git push?
Some programmers like to have a clean commit history, so after they make all the commits like "A small fix", "Correction to the fix", "It works this time" etc, they squash commits and rewrite them so they make sense. Also, one might not want to have their commits on the server before it's finished so it can be rebased and corrected without force pushing. More on reddit.com
🌐 r/learnprogramming
28
48
February 6, 2023
🌐
Earth Data Science
earthdatascience.org › home
First steps with git: clone, add, commit, push | Earth Data Science - Earth Lab
September 12, 2017 - Learn basic git commands, including clone, add, commit, and push.
🌐
Graphite
graphite.com › guides › git-add-commit-push
Git add, commit, and push - Graphite
This guide focuses on the essential Git commands `git add`, `git commit`, and `git push`, providing a clear understanding of each step and how they work together to manage your code changes.
🌐
DataCamp
datacamp.com › tutorial › git-push-pull
Git Push and Pull Tutorial | DataCamp
July 23, 2019 - You need to add and commit by using the following commands. You need to push the content by git push origin 'branch_name'. In the above code, origin is the remote repository, and 'branch_name' is the required branch where you need to upload your local content.
🌐
JetBrains
jetbrains.com › help › idea › commit-and-push-changes.html
Commit and push changes to Git repository | IntelliJ IDEA Documentation
February 16, 2026 - When you're ready, click Commit or Commit and Push (Ctrl+Alt+K) to push the changes to the remote repository immediately after the commit. You will be able to review the current commit as well as all other commits before they are pushed to the ...
Find elsewhere
🌐
Reddit
reddit.com › r/git › pushing to github via the terminal
r/git on Reddit: Pushing to GitHub via the terminal
March 31, 2023 -

Hey, I’m a new software developer looking to build a portfolio. When pushing to GitHub via the terminal, am I supposed to push the root folder of my project onto the repository? Or is it specific files or sub folders? Are there any best practices for having a presentable repository? And lastly, what do I add in the ReadMe file?

🌐
Zapier
zapier.com › productivity › app tutorials
How to push to GitHub | Zapier
April 24, 2025 - Once you've added your files to your directory and are ready to push to GitHub, in your Bash window, enter git add . to select all the files in your repository. Enter git commit -m "[commit message]" to save the changes to your local repository.
🌐
Medium
panjeh.medium.com › makefile-git-add-commit-push-github-all-in-one-command-9dcf76220f48
Makefile git add commit push github All in One command | by Panjeh | Medium
April 24, 2024 - Check this github link to get access to the script. Open the terminal. Change the current working directory to your local repository. Stage the file for commit to your local repository by the following command.
🌐
GitHub
docs.github.com › en › migrations › importing-source-code › using-the-command-line-to-import-source-code › adding-locally-hosted-code-to-github
Adding locally hosted code to GitHub - GitHub Docs
For example, gh repo create --source=. --public. Specify a remote with the --remote flag. To push your commits, pass the --push flag. For more information about possible arguments, see the GitHub CLI manual.
🌐
Quora
quora.com › How-can-I-commit-and-push-at-same-time-in-Git
How to commit and push at same time in Git - Quora
If the remote rejects the push (out-of-date), you’ll need to pull/rebase first: git pull --rebase && git push. For commits that include new files, ensure they are staged (git add) or use git add -A in the one-liner.
🌐
Atlassian
atlassian.com › git › tutorials › syncing › git-push
Git Push | Atlassian Git Tutorial
Remote branches are configured using the git remote command. Pushing has the potential to overwrite changes, caution should be taken when pushing. These issues are discussed below. ... Push the specified branch to , along with all of the necessary commits and internal objects.
🌐
JetBrains
jetbrains.com › help › pycharm › commit-and-push-changes.html
Commit and push changes to Git repository | PyCharm Documentation
February 16, 2026 - When you're ready, click Commit or Commit and Push (Ctrl+Alt+K) to push the changes to the remote repository immediately after the commit. You will be able to review the current commit as well as all other commits before they are pushed to the ...
🌐
W3Schools
w3schools.com › git › git_commit.asp
Git Commit
This commits all modified and deleted files, but not new/untracked files. git commit -a -m "Quick update to README" [master 123abcd] Quick update to README 1 file changed, 2 insertions(+)
🌐
Kev Quirk
kevquirk.com › git-commit-and-push-script
A Script to Automate Git Add, Commit & Push - Kev Quirk
I'm typing the post in Typora; so being able to flip to the command line and enter a single command, would be great. Since I use an M1 Macbook Air, which is basically Unix under the hood, I can use good old BASH to do this. So I used the following script (thanks to StackOverflow): #!/bin/bash read -p "Commit message: " desc git add . && \ git commit -m "$desc" && \ git push
🌐
GeeksforGeeks
geeksforgeeks.org › git › pushing-changes-to-a-git-repository
Pushing Changes to a Git Repository - GeeksforGeeks
July 12, 2025 - Step 1: Make sure that your local and Git repositories are up. Step 2: Stage the modified files using the command line below. ... (.) represents all the untracked files. If you want to move a specific file then you can the following command. ... Step 3: Commit the staged files into the local repository using the following command. Provide a commit message that details the changes you made and is descriptive. ... Step 4: Push the commit to the remote repository from there other developers can access the code.
🌐
GitLab
docs.gitlab.com › topics › git › commit
Stage, commit, and push changes | GitLab Docs
git commit -a -m "<comment that describes the changes>" Be careful your commit doesn’t include files you don’t want to record to the remote repository. As a rule, always check the status of your local repository before you commit changes. To push all local changes to the remote repository:
🌐
JetBrains
jetbrains.com › help › clion › commit-and-push-changes.html
Commit and push changes to Git repository | CLion Documentation
February 16, 2026 - When you're ready, click Commit or Commit and Push (Ctrl+Alt+K) to push the changes to the remote repository immediately after the commit. You will be able to review the current commit as well as all other commits before they are pushed to the ...