If you work alone and always make your changes locally and push to live (never making a change directly on the live server) this should always be the case, and will make your work much easier. The "and can be fast-forwarded" part always makes me happy when I see it because it means I can merge the changes without having to worry about fixing merge conflicts. This shows us that our branch (on the live server) is behind 'origin/master' (the central repo) by 1 commit and that it can be fast-forwarded. Nothing to commit (working directory clean) # Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded. If we type "git status", we'll see the message: Now that they have the same information, if I type "git fetch" again, we won't see anything output to the screen because there's nothing new to show. When I pressed Enter, git compared my repo with the central repo, and since there was a difference, it downloaded the information about the difference. Type "git fetch" to query the central repo for any changes not present on the live server.Switch to the "Remote - Live" terminal tab.I'm calling the safe way because you can avoid code conflicts in real time by merging multiple edits in a single file instead of trying to overwrite one with the other. The first way I'll show you to move a change to the Live server will be the "safe" way. The "git merge" command is safer, but takes a little longer, while "git pull" is much faster, but has the potential to cause conflicts in the code. There are two common ways to move the changes from the central repo to a remote repo, like the live server: "git merge" and "git pull".
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |