Difference between revisions of "Make Local Changes and Update remote Repositories"

From wikieduonline
Jump to navigation Jump to search
Line 3: Line 3:
  
 
Add local changes.
 
Add local changes.
# Stage files.
+
# Stage/add files:
 
#* 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 "&lt;some message&gt;"</code>
 
#* Commit changes into the local repository using the command:<br><code>[[git commit]] -m "&lt;some message&gt;"</code>
 
# Connect to a remote repository.
 
# Connect to a remote repository.
 
#* Connect to a remote repository using the command:<br><code>git remote add &lt;name&gt; &lt;url&gt;</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 &lt;name&gt; &lt;url&gt;</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> or <code>git push -h 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> or <code>git push -h origin master</code>

Revision as of 11:54, 12 November 2020

git add -> git commit -> git push

Add local changes.

  1. Stage/add files:
    • Add files to the folder or modify existing files.
    • Add new and modified files to the git staging area using the command:
      git add .[1] or git add some_modified_file.txt or git add -A
  1. Commit changes"
    • Commit changes into the local repository using the command:
      git commit -m "<some message>"
  2. Connect to a remote repository.
    • Connect to a remote repository using the command:
      git remote add <name> <url>[2]
  1. Push changes to a remote repository.
    • Push changes from your local repository to a remote repository using the command:
      git push[3] or git push origin master or git push -h origin master


See also

  • 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
  • Advertising: