<div dir="ltr" style="text-align: justify;" trbidi="on">
<div dir="ltr" style="text-align: justify;" trbidi="on">Millions of developers use GitHub to build personal projects, support their businesses, and work together on open source technologies. Git is very popular repository server. There are lots of command for git lets see difference between <b>git add -A</b>, <b>git add .</b> and <b>git add -u</b> .</p>
<p><b>According to git version 1.x</b></p>
<p>&#8220;<b>git add -A</b>&#8221; is equivalent to &#8220;<b>git add .</b>&#8221; and &#8220;<b>git add -u</b>&#8220;</p>
<ul style="text-align: left;">
<li><b>git add -A</b> stages All</li>
<li><b>git add .</b> stages new and modified, without deleted</li>
<li><b>git add -u</b> stages modified and deleted, without new</li>
</ul>
<p>
The important point about<b> git add .</b> is that it looks at the working tree and adds all those paths to the staged changes if they are either changed or are new and not ignored, it does not stage any &#8216;rm&#8217; actions.</p>
<p><b>git add -u</b> looks at all the already tracked files and stages the changes to those files if they are different or if they have been removed. It does not add any new files, it only stages changes to already tracked files.</p>
<p><b>git add -A</b> is a handy shortcut for doing both.</p>
<div align='center' id="ads-id"></div>
<ul style="text-align: left;">
<li><b>git add -A is equivalent to git add &#8211;all</b></li>
<li><b>git add -u is equivalent to git add &#8211;update</b></li>
</ul>
<p>
<b>According to git version 2.x</b></p>
<ul style="text-align: left;">
<li><b>git add -A</b> ;stages All</li>
<li><b>git add .</b> ;stages All in same path</li>
<li><b>git add -u</b> ;stages modified and deleted, without new</li>
</ul>
<p>
There is no more difference in <b>2.0</b>. <b>git add .</b> equals to <b>git add -A</b> for the same path, the only difference is if there are new files in other paths of the tree.</p>
<p>With <b>Git 2.0</b>, <b>git add -A</b> is <b>default</b>: <b>git add .</b> equals <b>git add -A .</b></div>
<p>
</div>
<div class="wp-post-navigation"> 
									 <div class="wp-post-navigation-pre"> 
									 <a href="https://dineshonjava.com/adding-existing-project-to-github-using/">Previous</a> 
									 </div> 
									 <div class="wp-post-navigation-next"> 
									 <a href="https://dineshonjava.com/what-is-github-and-creating-repository-and-branches-on-git/">Next</a> 
									 </div> 
									</div>
<script type="text/javascript">
jQuery(document).ready(function($) {
 $.post('https://dineshonjava.com/wp-admin/admin-ajax.php', {action: 'mts_view_count', id: '154'});
});
</script>
Strategy Design Patterns We can easily create a strategy design pattern using lambda. To implement…
Decorator Pattern A decorator pattern allows a user to add new functionality to an existing…
Delegating pattern In software engineering, the delegation pattern is an object-oriented design pattern that allows…
Technology has emerged a lot in the last decade, and now we have artificial intelligence;…
Managing a database is becoming increasingly complex now due to the vast amount of data…
Overview In this article, we will explore Spring Scheduler how we could use it by…