Linked Questions
30 questions linked to/from How to automatically push after committing in git?
0
votes
0answers
49 views
When I commit to a local git repository, I want it to automatically push to the repository on Bitbucket [duplicate]
I have a local git repository. I commit a change using git commit -a and it updates the local repository. So far so good.
I would like it so when I do this it also automatically pushes to my remote ...
2982
votes
38answers
1.9m views
How to get the current branch name in Git?
I'm from a Subversion background and, when I had a branch, I knew what I was working on with "These working files point to this branch".
But with Git I'm not sure when I am editing a file in NetBeans ...
4419
votes
26answers
2.0m views
How to change the URI (URL) for a remote Git repository?
I have a repo (origin) on a USB key that I cloned on my hard drive (local). I moved "origin" to a NAS and successfully tested cloning it from here.
I would like to know if I can change the URI of "...
204
votes
14answers
308k views
Configuring Git over SSH to login once
I have cloned my git repository over ssh. So, each time I communicate with the origin master by pushing or pulling, I have to reenter my password. How can I configure git so that I do not need to ...
161
votes
4answers
183k views
Emulating a do-while loop in Bash
What is the best way to emulate a do-while loop in Bash?
I could check for the condition before entering the while loop, and then continue re-checking the condition in the loop, but that's duplicated ...
175
votes
4answers
119k views
Git - How to use .netrc file on Windows to save user and password
Is it possible to use a .netrc file on Windows when I'm using Git to clone a remote repository with HTTP and user - password?
51
votes
10answers
57k views
How to check if ssh-agent is already running in bash?
I have a sample sh script on my Linux environment, which basically run's the ssh-agent for the current shell, adds a key to it and runs two git commands:
#!/bin/bash
eval "$(ssh-agent -s)"
ssh-add /...
45
votes
3answers
16k views
Visual Studio Code push automatically
Is it possible to make git push after commit automatically?
Now I need to click on push after commit manually and this is not very comfortable.
20
votes
6answers
19k views
Jenkins: what is the correct format for private key in Credentials
I'm creating a job in Jenkins 2.152 running on Windows Server 2016 which needs to pull from a git repo hosted on bitbucket.org.
I tested the ssh key through git-bash so I know it works and there is no ...
26
votes
4answers
53k views
Make a shell script to update 3 git repos
I am working with 5 repos that I have cloned in my development environment.
When I want to update a git repo, I enter the folder /home/adrian/repo1/ and do:
git checkout master
git pull origin ...
9
votes
2answers
11k views
How to configure automatic pushing?
How do I configure automatic push in Mercurial and Git?
Sometimes I forgot to push in a computer, and when I move my location, I'm out of the sync with the good code. Is there a way to mercurial and ...
11
votes
2answers
11k views
Using GitHub behind a firewall without SSH access
I really want to use GitHub, but my company has everything locked down. Now, I can only use Tortoise SVN through the HTTP protocol. Can I use GitHub the same way? If so, how?
6
votes
2answers
2k views
Git - How to auto push changes in a directory to another branch
Complete question rewrite
So I thought I was explaining this question very simply and direct but it seems I oversimplified to much, so here is all the extra details. Hopefully this helps everyone see ...
1
vote
2answers
4k views
Sublime Merge SSH Failing when Key has password
When I try to clone a repo I get a git failed with exit code 128.
Also when I try to push/pull I get a git@gitlab.com public key denied.
In my ~/.ssh folder I have a config file that looks like this:...
2
votes
1answer
6k views
git commit & push in IntelliJ
How can I configure IntelliJ to commit and push in a single task (preferably a keyboard shortcut)?
When developing I'm always on a work-in-progress branch and use git commit nearly as often as saving ...