I have installed the latest MSysGit 1.6.3 preview and TortoiseGit 0.6.2 on my Windows XP PC. I also have created a --bare repository on my server which can be access through http (using WebDAV as authentication system).
I can successfully log into my server's git repository from a browser. I have created a local repository on my PC and the initial commit.
I have looked everyone and I still cannot find how to add a remote URL to TortoiseGit and push my local repository to that address.
Any ideas?
Thank you.
It checks if the server branch points to the same commit as the remote-tracking branch (known changes). If yes, a force push will be performed. Otherwise it will be rejected.
Use the TortoiseGit Puttykey generator to create a new keypair add your public key to GitHub. Clone/create a new repository. In thee Tortoise repository settings, set your fullname and email. Then in remote menu under the Git configuration menu enter your clone URL and select your PuTTY key.
Find the id_rsa file that you created in step (3), you will be prompted for your passphrase. Enter it. IMPORTANT: bring up the TortoiseGit context menu, go to settings .
Select any file and/or folders you want to commit, then TortoiseGit → Commit.... The commit dialog will show you every changed file, including added, deleted and unversioned files. If you don't want a changed file to be committed, just uncheck that file.
In order to perform a push open the push dialog using TortoiseGit → Push... . Pushing changes is also possible using the Sync dialog (cf. the section called “Sync” ), however, there you have less options, but the sync dialog allows you to initiate other operations such as pulling and to see diffs and changes.
Following is a basic syntax which we will use through out this article to change remote URL. For complete list of supported options you can check official git documentation. git remote set-url [--push] <name> <newurl> [<oldurl>] git remote set-url --add [--push] <name> <newurl> git remote set-url --delete [--push] <name> <url>
Let’s look at how to create branches in the local repository using TortoiseGit and push the changes back to the remote repository. Right-Click in the File explorer within the repository and select TortoiseGit =>Create Branch. Name it enhancement and select the checkbox Switch to the new branch. Click Ok.
Integrate the remote changes (e.g. hint: 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. You could do a git pull here to merge the differences, but if you really want to overwrite the remote repository you can add the --force flag to your push:
In the context menu, select "TortoiseGIT" -> "Push ...". Right of the "Remotes" entry there is a "Manage" button. There, choose "Git" -> "Remotes" in the tree. There you can input Remote URLs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With