How to remove sepcific files from commits in bitbucket using command line
I mistakenly committed some files ending with ~ (unsaved files on my local machine) repeatedly. c7b7b14
These contain files ending with .html~ or .js~ and I want to get rid off them and the files are already pushed ? How do we do that?(beginner)
See also questions close to this topic
Git Extension language setting
I had installed Git Extensions Mono in Debian (tinker board). When I use mono GitExtension.exe at the first time, it appears a language setting window with full of national flag selection. And I pick a wrong language flag by mistake! The Git Extension can load up. But all the wording on the Git Extension become white square box just like those utf 8 not support webpages.
I wan to reset the language setting of the Git Extension or Mono?! How can I do it?
GitLab - setting up SSH Keys in gives "Invaid Key" Error
I'm trying to set up Git in my Windows 7 Machine. I downloaded Git Bash already, and then set the username and email addresses as well.
I made an
id_rsakey with the help of PuttyGen, and to confirm, I ran
cat ~/.ssh/id_rsa, and the key was shown. I then copy pasted this onto my gitlab profile, used the default title, and then saved it.
Using the terminal, I then navigated to my Eclipse Workspace, ran
git clone MyProjectNameHere, and got the following:
$ git clone email@example.com:Marswin_Projects/MyProjectNameHere.git Cloning into 'MyProjectNameHere'... key_load_public: invalid format Load key "/c/Users/Angelo/.ssh/id_rsa": invalid format firstname.lastname@example.org: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
Now I'm not sure what's wrong. I navigated to the
.sshfolder and then checked the
id_rsa.pubfile, and it is the key that I copied on my profile. I then tried to add it and then I was shown this error:
$ ssh-add ~/.ssh/id_rsa Error loading key "/c/Users/MyUserName/.ssh/id_rsa": invalid format
Now I'm not sure what to do. The SSH Key was working with gitlab, but it seems that my Windows System isn't able to use it?
Any lead would be very much appreciated here.
(Git) post-receive-email: change destination addresses depending on which branch a update is pushed to
I have a git repository and use it as an auto-deploy system on a web page. The repository has two branches, master and test branch. We develop the web on the test branch and once the test goes well, marge it to the master branch as a product web page.
What I want to do are as follows:
- get notification emails
- when someone pushes his commit to the test branch, the notification email is sent to email@example.com
- when someone pushes his commit to the master branch, the notification email is sent to firstname.lastname@example.org
As far as I understand, the destination email addresses are set via a set of commands as follows:
cd repository.git git config hooks.mailinglist "foobar" git config hooks.announcelist "foobar" git config hooks.emailprefix "foobar" echo foobar > description
It looks like impossible to change the destination addresses depending on which branch updates are pushed to because I think even if I make two post-receive-email-s, like post-receive-email and post-receive-email2, the two scripts share the destination addresses set by
git config hooks.mailinglist.
Is there any workaround of this matter? OR just I'm missing something?
Any advice is appreciated.
ssh: connect to host bitbucket.org port 22: Network is unreachable
Unable to git pull, clone, push from AWS ec2 to bitbucket.
Getting error "ssh: connect to host bitbucket.org port 22: Network is unreachable fatal: Could not read from remote repository."
EC2 details - Ubuntu 16.04 Git version - 2.4.7
AWS EC2 instance not able to connect to bitbucket.org
EC2 Details: OS: Ubuntu 16.04 Git client: git version 2.7.4
From AWS instance I am not able to connect to bitbucket.org repositories. Tried ping to bitbucket.org but, I didn't got any response. I check-out bit-bucket repository via ssh clone. Outbound traffic is of type 'All traffic'.
Deploy repository to remote server and use of branches
Quick Brief, this will explain where I am at.
I am at the very early stages of Git, I'm the kind of person that used to upload their site and edit via FTP, I'm a one-man show and this worked for me. This doesn't however, keep track of changes and in all fairness, you forget where you are. I've now started getting to grips with Git, my setup is:
Computer: Mac with High Sierra Git Repository: Bitbucket Git Gui: Sourcetree
I have successfully setup Git locally and pushed files to Bitbucket using SSH and any commits are being shown correctly. I have not added Git to the remote server part as I wasn't sure if it's done the same way.
I am using 1 branch, the Master Branch.
Being a one-man band, should I use different branches?
My main question is:
Now that Bitbucket holds my files, I wish to deploy these to my remote server. I understand there are such tools out there called Travis CI and Teamcity to name a couple but there is also Bitbucket Pipelines. Surely Pipelines is the way to go now especially as I'm using Bitbucket?
If so, I cannot work out for the life of me how to deploy from Bitbucket to my remote server using Pipelines and Git?