There are tutorials on the web for setting up and using Xservers under Win32 (e.g., Xming). While this is not a problem on Linux (or OS X), it gets complicated for Win32. You need an Xserver running on your local machine, in order to use XForwarding. On your local OS X machine, you would instead use -Y: ssh -Y cd git gui To use that on your local Linux machine, you would usually use the -X flag to enable XForwarding for a given connection: ssh -X cd git gui You also must enable Xforwarding, by making sure that you have a line like the following in your /etc/ssh/sshd_config: X11Forwarding yes On the server-side, this means that you need to have the proper tools installed (e.g., git-gui, which means that you also need Tcl/Tk installed, which means that you also need the X infrastructure installed). Then, in GitKraken, click Add Remote (green + next to REMOTE in the left panel) > call it origin > paste the URL into the Pull URL space (the Push. Right click on a branch to set the upstream or click the option.Īlternatively, drag and drop a branch to push instead of setting upstream.If your server has it enabled, you can use XForwarding to display a GUI executed on the remote machine on your local machine. The Upstream defaults to the remote branch where the local branch was checked out, but you may change the Upstream to push, pull, or fetch from a different branch. Whenever pushing, pulling, or fetching, GitKraken Client gets updates from the Upstream branch. Set the default pull option by clicking the down arrow to the right, and clicking on the circle button by each option. The remote commits were pulled in, then the local commits were moved on top of them. This has the added benefit of maintaining all commits in a single line, as opposed to creating branches which are then merged back together. Pull (rebase) stashes all commits on this branch, pulls in new commits from the remote, and then replays your commits. In our 2-commit example, a fast-forward is not possible as there are new commits added to both branches. If a fast-forward is not possible, GitKraken Client will not make any changes to the local repo. Pull (fast-forward only) fetches any updates and then attempts a fast-forward. A fast-forward was not possible, so the remote branch was merged into the local branch. This is the default option for new GitKraken Client users. ![]() ![]() If a fast-forward is not possible, a merge will be performed. Pull (fast-forward if possible) fetches any updates on the remote branch, then attempts to fast-forward the local branch. The remote commits display on the graph because they have been fetched,but have not been incorporated into the local repo. Let’s demonstrate what each one does by starting with an example 2 commits made locally, and 2 that have been made on the remote. Pulling first performs a fetch and then incorporates any commits in the remote repository into the local copy. To fast-forward your currently checked out commit, you can right click on the branch with newer commits, and select the Fast-Forward option from the menu. Fast-forwardingįast forwarding moves the currently checked out commit to one that was added later, replaying all commits in between in the order which they happened. You can change this setting from Preferences > General menu. GitKraken Client automatically fetches updates from your remote repositories every minute by default. However if you are both ahead and behind a remote, you will not be able to perform a Pull (fast-forward if possible) as the branches have diverged. It is possible to be both ahead of and behind a remote. If you are ahead of the remote branch, there are local commits that have not yet been pushed to the remote. Pull (fast-forward if possible) to get these changes on local. When you’re behind the remote, it means that there are commits on the remote branch which have not been incorporated into the local repo. Updates will appear in the graph, and also update any branches on the left to show how many commits you are ahead or behind. Pulling and fetching take updates from the remote and get them into our local repo.įetching gets updates from remote branches, but does not update any files in your working directory. You may drag a branch to a remote branch on the graph, or to a remote branch listed in the left panel. ![]() Drag and drop to pushĭrag and drop a branch to a remote to access the Push action. This is typically the fork name followed by a slash, and the branch name. If the branch pushed does not exist on the remote, GitKraken Client will prompt you to name and create the new remote branch. Caution: Forcing a push is considered destructive because it overwrites the remote branch by replacing it with the local branch.
0 Comments
Leave a Reply. |