Push the dev Branch to Remote Git Repository Upstream # git pushįatal: The current branch dev has no upstream branch.ģ. When you do a git push at this stage, it will give the following error message, as we don’t have the “dev” branch in the remote git repository. Even if you are the only person who is working on the “dev” branch, it is still a good idea to push your local changes to remote git repo to keep a remote backup of your changes. This way, you can push all your changes to the remote dev branch, and someone else who is working on the “dev” branch can then checkout the changes. It’s better to push our local “dev” branch to the remote git repository. It’s important to understand that when we initially created our branch, it exists only locally on our local laptop. # git commit -a -m "Fixed email address"ġ file changed, 1 insertion(+), 1 deletion(-) Since we are already inside the dev branch, any commit that we do will happen only on the dev branch. # vim index.htmlĬommit the change to the dev branch. In this example, let us make a change to index.html file. Any change that you do from now on will be only on the “dev” branch. Now that we have a new “dev” branch, start making your changes here. The following git status command indicates that we are currently on the new “dev” branch. # git branch -aĪs you see from the above output, the * is now in front of dev, which indicates the current working branch is dev. Verify that the new branch got created as shown below.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |