edit-article
Home
Up
Delete
Article Name:
Article Description:
] gits basic commands to add new (or updated) files to your repo and then commit those changes
Chapter ID/Name:
Status:
Write
Writing
Written
Add Photo:
Owner ID:
Content:
use HTML
Edit Content
<h1 style="text-align: center;">git add and git commit</h1> <h2>[WHAT]</h2> <ol> <li>] by Don Sagrott, founder @sospep.com - the very basic operations at the heart of git </li> </ol> <h2>[WHY]</h2> <ol> <li>] git add - adds any new or updated files that are physically present in the repo, to the 'git repo'</li> <li>] git commit - tells git that your serious about the changes, prompts you to add a 'commit message'</li> </ol> <h2>[WHERE]</h2> <ol> <li><strong>] READ THE FULL ARTICLE</strong></li> <ol> <li>] see EXAMPLE section below </li> </ol></ol> <h2>[WHEN]</h2> <ol> <li>] 2017-05-01</li> </ol> <h2>[EXAMPLE]</h2> <ol> <li><strong>] git add</strong></li> <ol> <li>] after editing any file in the repo, you need to <strong>ADD</strong> it back to the repo</li> <li>] after creating/adding any new file to the repo, you need to ADD the file to the repo with git</li> <li><strong>] EXAMPLE </strong></li> <li>] git add *.* </li> <li>] git add --all || git add -a </li> </ol> <li><strong>] git commit</strong></li> <ol> <li>] after adding a new or edited file to your repo, you need to <strong>commit</strong> it to the repo</li> <li>] after executing the commit command, you will be prompted to enter a commit message</li> <li>] the commit message is a 'comment' that documents the change(s) made to your source code </li> <li><strong>] EXAMPLE</strong></li> <li>] git commit -a</li> <li>] </li> </ol></ol> <h2>[HOW-TO]</h2> <ol> <li><strong>[00:00] NEW task </strong></li> <ol> <li>] # # </li> </ol></ol> <h2>[REFERENCE]</h2> <ol> <li>x] # 7283 - <a href="/view/task?id=7283" target="_blank">CREATE-article# 5730</a> - </li> </ol> <h2>[RELATED]</h2> <div><ol> <li>] BOOK <a href="/view/chapters?id=263" target="_blank">git-started</a> - <a href="/view/article?id=2459" target="_blank">contents</a> </li> </ol></div> <h1 style="text-align: center;"> </h1>