Difference between revisions of "Git commit"
Jump to navigation
Jump to search
Line 5: | Line 5: | ||
==Basic commands== | ==Basic commands== | ||
− | *<code>touch README.md</code> | + | * <code>touch README.md</code> |
− | *<code>[[git add]] README.md</code> | + | * <code>[[git add]] README.md</code> |
− | *<code>git commit -m "Creating README"</code> | + | * <code>git commit -m "Creating README"</code> |
− | *<code>[[git push -u origin master]]</code> | + | * <code>[[git push -u origin master]]</code> |
+ | * <code>[[git commit -a]]</code> | ||
===Examples=== | ===Examples=== | ||
Line 50: | Line 51: | ||
nothing to commit, working tree clean | nothing to commit, working tree clean | ||
− | |||
== Related terms == | == Related terms == |
Revision as of 15:35, 21 September 2021
Steps: git add
-> git commit
-> git push
Basic commands
touch README.md
git add README.md
git commit -m "Creating README"
git push -u origin master
git commit -a
Examples
git commit -m "your message" [master (root-commit) 07e1897] PATH 3 files changed, 3 insertions(+) create mode 100644 file1.txt create mode 100644 file2.txt create mode 100644 file3.txt
git commit -m "test" On branch main nothing to commit, working tree clean
Status
git status On branch master nothing to commit, working tree clean
git status On branch master Untracked files: (use "git add <file>..." to include in what will be committed) file_you_forgot_to_add.txt nothing added to commit but untracked files present (use "git add" to track)
git status On branch master Changes to be committed: (use "git reset HEAD <file>..." to unstage) new_file: file_you_forgot_to_commit.txt
git commit -m "my test" On branch master Your branch is based on 'origin/master', but the upstream is gone. (use "git branch --unset-upstream" to fixup) nothing to commit, working tree clean
Related terms
- Make Local Changes and Update remote Repositories
git config --global --edit
aws codepipeline
git cz
git remote add
See also
docker container commit
git
: [config | init | status ]
,git add
,git rm
,git commit
,git push, git pull
,.gitconfig
,.gitignore
,git
(clone
,fetch
,pull
),git tag
,git log
,git blame
, Merge Request, LFS,git branch
,git apply
,git rebase
,git diff
,git diff-tree
,git config --global
,remote | submodule | request-pull
,GIT_TRACE, GIT_CURL_VERBOSE
,clean
,main
,git show-ref
,git reset
,git prune
,git ls-remote origin
,git checkout
,git switch
,pathspec
,git credential-osxkeychain
,git version
,pre-commit
,git --help
, GitBook,refs/
Advertising: