(Use of git status is needed here to see which files are in conflict).Īs an additional safe-guard you may create a name for your previous workīefore you rebase so that you can easily recover it if the rebase goesīad. Or resolve the conflicts, git add the changed files and continue the rebase with If you get conflicts you can drop your local conflicting commit by Rebase your local branch on top of the latest official state.įor the FlightGear, SimGear, and FGData sources this would beĤ. Fetch the latest stuff from the main repository.ģ. Git commit - creates a commit with the changes you have added.Ģ. Git add file1 file2 etc - adds the files you want to commit ![]() Git status - show you what files you have modified. First commit your changes to your local branch. If you do have changes you want to keep I'd recommend using git rebase to keep them "on top" of the official work:ġ. If you don't care about the messyness of your local history read no further than point 1 below and use git pull without hesitation :) Git pull will also work if you have committed local changes but will make your local history messy (and the official history too if your changesĪre ever merged back into the official history). With git branch -t -l my-2.2.0 origin/releases/2.2.0 git pull Git doesn't create a local branch automatically. You can create a local version of a remote branch with "git branch releases-2.2.0 origin/releases-2.2.0"or "git checkout -b releases-2.2.0 my clone of fgdata) where the branch will be named next. Pushes the local branch named my-branch to my-fgdata (i.e. Stores the URL to my fgdata clone under the name my-fgdata in my local git clone of fgdata. Git remote add my-fgdata git://.net/p/flightgear/fgdata/ Now, before anyone unnecessarily goes through the pain of cloning fgdataĪgain, you just need to add the git URL to your new personalĬlone as a remote in your local fgdata clone to be able to ![]() Use with care, as any option that name is -f or -force, and only after reading git checkout help! git pull may be used for future updates git remote - adding remote repositories Some more helpful commands git help git help git apply apply a patch to files and/or to the index git checkout -f may be used to throw away any local changes to the working tree. 9 Updating a merge request after changes.8 Keeping topic branches in sync with upstream.2 git remote - adding remote repositories.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |