We are working on a project as a team.
I have just cloned the project from github
I have the project on my computer - wamp
.
I added a new file and I want to update my local
.
I have used the git add xxx.php
but the newly added file is still not visible to wamp/apache
.
Do I need to commit to have this new file visible in wamp
?
Does using commit update the main project in github
or just my clone?
You do need to do both git add
and git commit
to actually store changes in the repository. If you want to share those changes with others in another repository, you will also have to push your changes.
Please read about the basics of Git in the Git Book . Or check out some other tutorial.
Commit updates only your local repository. Push then propagates these updates from your local repository to the remote repository (github).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.