How to rename a remote branch using TortoiseGit? - branch

I have seen a few questions about this, like:
How do I rename both a Git local and remote branch name?
But I am using TortoiseGit.
As you can see:
I recently renamed my local branch from ImportPTS to import-publictalk-names. I have just pushed my commit from the new named branch to the existing remote named branch.
But I would like the remote named branch to match. Can we do this with TortoiseGit? I tried with the Browser Ref window and couldn't see it.

Open the push dialog and enter a different name for "remote branch". In order to automatically select the name branch for pushing and pulling, also select "Set upstream/track remote branch". After that the old remote branch can be deleted (e.g., using the log dialog).
Remote branches exist in the remote repository, but also have a "local" corresponding branch named remotes/NAME/branchname. Additionally, you have local branches which can have a remote tracked branch, which is a branch name which exists on a remote repository and which is used automatically for pulling and pushing.

Related

How to push Fossil local repository to remote hosting

It would be great if you could help me with one thing.
I'm using Fossil as my version manager. Using this on my PC is not a problem but when I try to push it to remote repository I can't.
Here's the thing:
When inside folder with my repository I type
fossil push https://chiselapp.com/user/sebatbg/repository/nres
I get info that:
Error: Wrong project
When I type
fossil push https://sebatbg#chiselapp.com/user/sebatbg/repository/nres
It asks for my password but when I enter it fossil says that Login failed
I tried both my pass to chisel app and for specific repository but result is the same.
Could anyone tell me step by step how to do the push?
Thank you
Fossil assigns a unique ID, called the "project ID", to each new repository. The error message "Wrong project" means that you've got different repositories locally and remotely, that their project-IDs don't match.
The only way I know to publish an existing local repository on Chisel is to upload said repository, and then set the remote-url of your local repository to the Chisel URL, either explicitly or by pulling from the URL.
I had a similar problem. I had cloned a remote repository, but could not push to it.
I could solve it by adding the username to the remote url
remote-url https://{username}#chiselapp.com/user/{chiselab-user}/repository/{repository-name}
you are then prompted for the password of the remote repository.
If you have an existing local repository that you would like to upload to the chiselapp hosting service, the process can be a bit awkward. If your repository is smaller than 8M, chiselapp provides a command Upload repository that may suit your purposes. Otherwise, this is what you need to do:
Navigate to a source tree for the local repository.
Issue the fossil info command and copy the project-code of the local
repository. This is a SHA1 hash.
Log in to chiselapp.com website and click on the Create Repository
link in the header of the home page.
Paste the previously copied project-code into the Override Project Code
field of the resulting form.
Fill the remaining fields as appropriate and click the Create Repository
button at the bottom of the page.
Record the password that is then assigned to you.
Navigate to the chiselapp dashboard and click on the name of the newly
created repository. This should bring you to the fossil web interface of this repository.
Login to the new repository using your local username and the recorded
password. This should be the only user so far and should have setup user permissions.
Navigate to the Admin/Stats page and check that the Project ID of the new
remote repository matches the project-code of the local repository.
Back in the local repository's source tree issue the command
fossil push https://<username>:<recorded-password>#chiselapp.com/user/<username>/repository/<repository-name> -R <local-repository-file>

How to put local branch to origin with GitKraken?

I created branches and it shows branch does not exist on origin when I pull files.
How to add my local branches to origin with GitKraken?
No cmd and GitHub.
Right click on the local branch and from the context menu select Set
Upstream
Then type a name for your remote branch and click ok.
Ref: https://reganmusic.wordpress.com/2016/07/19/branching-in-gitkraken/

AccuRev, command-line, How to specify server address when login?

I'm using AccuRev5.7 command-line interface.
I know that "acclient.cnf" stores some server list.
How can I choose which server to login when running the "accurev login" command?
Can I pick one of the them, or, specify a new one, by command-line?
To log into another server via the CLI, use the "-H server:port" option for login.
Example:
accurev login -H servername:5050 username password
Working with Multiple Repositories
It’s possible to have multiple AccuRev repositories active in your organization, each managed by its own AccuRev server process. For most accurev CLI commands, you can specify the AccuRev server to target on the command line, using the –H option:
accurev show -H pluto:5050 users
This mechanism bypasses the acclient.cnf file, though the file must still exist.
It does not override a specification in the wspaces file, which is described below.
Setting Up Workspaces on Multiple Repositories
If the workspaces you’ve created on your client machine are not all associated with the same AccuRev server, then you might want to use a wspaces configuration file. This text file records the workspace-toserver association for each of your workspaces. Each user can have a wspaces file. It must be located under
the user’s home directory, within the .accurev subdirectory.
The accurev program uses this file to decide which AccuRev server to use:
• If the current working directory is within one of the workspace-root-directory locations listed in the wspaces file, the CLI command is directed to the associated server listed on the same line of the file.
• Otherwise (including the case in which no wspaces file exists), the CLI command is directed to first server listed in the machine’s acclient.cnf file. This is the default behavior that we’ve mentioned in the sections above.
For example, here is a sample wspaces file recording workspaces associated with servers venus and pluto:
gizmo_dvt_john /usr/john/gizmo_dvt venus 5050
frammis_2.3maint_john /usr/john/frammis_2.3_maint pluto 6678
The format of the file is:
• workspace name, which must not contain SPACE characters
• full pathname of workspace’s root directory, which must match the pathname listed by the accurev show wspaces command, and must not contain SPACE characters. The pathname always uses forward slashes ( / ), not backslashes ( \ ), even on Windows machines.
• server machine name (or IP address) AccuRev® CLI User’s Guide 5
• IP port number on which AccuRev server program listens
The last two fields must exactly match the server and port of an existing entry in the machine’s acclient.cnf file.
Note:
If your site has a single AccuRev server (or if your workspaces are all associated with a single server), there is no need for a wspaces file: the default behavior directs each CLI command to the server listed in your machine’s acclient.cnf file.

Rails and Git push, Git pull: logs return same commit, changes aren't made

I've got a local branch (master), a GitHub repo (origin), and another remote repo (server). I've set up my remote so locally I can type git push server master and push the changes to server/master.
When I type git log -1 locally and on the server they return the same commit, but none of the changes I made locally are visible on the server.
I deployed my app with Capistrano so redeploying it makes the changes visible immediately, but I don't want to have to redeploy every time I make a change.
Any idea what's going on here? I'm rather new to Git. Hopefully it's something easy to fix.
It sounds to me that you maybe looking at a different directory than your web server is pointed to.
When I setup capistrano:
cap deploy:setup
#then
cap deploy
it creates a directory structure similar to:
/releases (each deploy gets its own randome number directory)
/current (a sym-link to the latest release)
/shared
None of these folder are tied to git. Which makes me think your webserver may not be pointed to the same directory that you're using with git.
--
You may find cap deploy is preferable as you'll be able to see the output if there are any issues.
I'm not a huge expert but the above is how I've setup rails with Capistrano.
Normally origin is the name used for the GitHub remote and not master. You can check what remotes you have by doing git remote show. If you want even more detail on the remote use git remote show origin (or whatever your remote is called, if it is not origin). This will give you a list. I suspect that what you have is actually two local branches (master and server). Try doing a git push server origin. This will take your server branch and put it on GitHub.
Alternatively
If you are trying to combine the changes in your server branch with your master branch then use checkout master and then git merge server. This will merge your changes from the server branch into your master branch and you can then upload to GitHub via git push master origin.

Is there a way to delete a branch on heroku

I am using heroku to host my application. With merges and rebases i got 2 different stages of my app.
Local master is different from master on heroku.
pushing to heroku master failed with:
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git#heroku.com:xxxxx.git'
Merge the remote changes (e.g. 'git pull') before pushing again. See the
'Note about fast-forwards' section of 'git push --help' for details.
is there a way to delete the heroku master?
then i can push it again to heroku master..
You can force push
git push --force origin master
That will overwrite remote master.
You can also delete remote branch by doing this
git push origin :master
Note the colon before branch name. This command says "take void from local machine and put this instead of remote branch 'master'"
In my case, I renamed the branch on Heroku from master to main, and I want to delete the old master branch. If I delete the remote master branch directly on Heroku, it will be rejected.
The only way I found working is based on this document to reset.
Assume your app name is my-app. You can reset by
heroku plugins:install heroku-repo
heroku repo:reset --app=my-app
Note this will remove all branches in Heroku. So you need push to Heroku again by
git push heroku main