Lesson 7: Pushing to github #1744
-
i have just pushed my code once and it's shows 3 commit's why? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
I assume the push action and the commit action are not the same. The commit action commits changes to git, while the push action pushes code to GitHub. So, I will say that makes sense. |
Beta Was this translation helpful? Give feedback.
-
As much as I know, Foundry automatically creates a commit on initialization of a new project and on adding a new dependency so that's two commits. Even though forge-std is a built in library, I guess it is still counted as a dependency. The third commit is the one you made before pushing to GitHub I guess. If you remember, Patrick said in the course to always add "--no-commit" when installing a dependency. That's exactly because of the default behavior of Foundry to create a commit after installing a dependency so you have to instruct it not to create a new commit. |
Beta Was this translation helpful? Give feedback.
As much as I know, Foundry automatically creates a commit on initialization of a new project and on adding a new dependency so that's two commits. Even though forge-std is a built in library, I guess it is still counted as a dependency. The third commit is the one you made before pushing to GitHub I guess.
If you remember, Patrick said in the course to always add "--no-commit" when installing a dependency. That's exactly because of the default behavior of Foundry to create a commit after installing a dependency so you have to instruct it not to create a new commit.