Difference between revisions of "Make Local Changes and Update remote Repositories"
Jump to navigation
Jump to search
↑ http://man7.org/linux/man-pages/man1/git-add.1.html
↑ http://man7.org/linux/man-pages/man1/git-remote.1.html
↑ https://git-scm.com/docs/git-push
Line 7: | Line 7: | ||
#* Add files to the folder or modify existing files. | #* Add files to the folder or modify existing files. | ||
#* Add new and modified files to the git staging area using the command:<br><code>[[git add]] .</code><ref>http://man7.org/linux/man-pages/man1/git-add.1.html</ref> or <code>git add some_modified_file.txt</code> or <code>git add -A</code> | #* Add new and modified files to the git staging area using the command:<br><code>[[git add]] .</code><ref>http://man7.org/linux/man-pages/man1/git-add.1.html</ref> or <code>git add some_modified_file.txt</code> or <code>git add -A</code> | ||
+ | |||
# Commit changes" | # Commit changes" | ||
#* Commit changes into the local repository using the command:<br><code>[[git commit]] -m "<some message>"</code> | #* Commit changes into the local repository using the command:<br><code>[[git commit]] -m "<some message>"</code> | ||
+ | |||
# Connect to a remote repository. | # Connect to a remote repository. | ||
− | #* Connect to a remote repository using the command:<br><code>git remote add <name> <url></code><ref>http://man7.org/linux/man-pages/man1/git-remote.1.html</ref> | + | #* Connect to a remote repository using the command:<br><code>[[git remote add]] <name> <url></code><ref>http://man7.org/linux/man-pages/man1/git-remote.1.html</ref> |
+ | |||
# Push changes to a remote repository. | # Push changes to a remote repository. | ||
#* Push changes from your local repository to a remote repository using the command:<br><code>[[git push]]</code><ref>https://git-scm.com/docs/git-push</ref> or <code>[[git push origin master]]</code> | #* Push changes from your local repository to a remote repository using the command:<br><code>[[git push]]</code><ref>https://git-scm.com/docs/git-push</ref> or <code>[[git push origin master]]</code> |
Revision as of 15:21, 7 November 2022
Steps: git add
-> git commit
-> git push
Example
Add local changes.
- Stage/add files:
- Commit changes"
- Commit changes into the local repository using the command:
git commit -m "<some message>"
- Commit changes into the local repository using the command:
- Connect to a remote repository.
- Connect to a remote repository using the command:
git remote add <name> <url>
[2]
- Connect to a remote repository using the command:
- Push changes to a remote repository.
- Push changes from your local repository to a remote repository using the command:
git push
[3] orgit push origin master
- Push changes from your local repository to a remote repository using the command:
See also
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: