Git merge reports "Already up-to-date" though there is a difference

I have a git repository with 2 branches: master and test. There are differences between master and test branches. Both branches have all changes committed. If I do: git checkout master git diff...

How can I put a database under git (version control)?

I'm doing a web app, and I need to make a branch for some major changes, the thing is, these changes require changes to the database schema, so I'd like to put the entire database under git as...

git push says "everything up-to-date" even though I have local changes

I have a remote gitosis server and a local git repository, and each time I make a big change in my code, I'll push the changes to that server too. But today I find that even though I have some...

How do I check out a remote Git branch?

Somebody pushed a branch called test with git push origin test to a shared repository. I can see the branch with git branch -r. Now I'm trying to check out the remote test branch. I've tried: git...

Set up git to pull and push all branches

I'd like to push and pull all the branches by default, including the newly created ones. Is there a setting that I can define for it? Otherwise, when I add a new branch, locally and I want to pull...

How do I delete a Git branch locally and remotely?

I want to delete a branch both locally and remotely. Failed Attempts to Delete a Remote Branch $ git branch -d remotes/origin/bugfix error: branch 'remotes/origin/bugfix' not found. $ git branch...

How to get just one file from another branch?

I am using Git and working on master branch. This branch has a file called app.js. I have an experiment branch in which I made a bunch of changes and tons of commits. Now I want to bring all the...

How to amend several commits in Git to change author

I have made a series of commits in Git and I realise now that I forgot to set my user name and user email properties correctly (new machine). I have not yet pushed these commits to my repository,...

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...

How to fetch all Git branches

I cloned a Git repository, which contains about five branches. However, when I do git branch I only see one of them: $ git branch * master I know that I can do git branch -a to see all the...

Update a local branch with the changes from a tracked remote branch

I have a local branch named 'my_local_branch', which tracks a remote branch origin/my_remote_branch. Now, the remote branch has been updated, and I am on the 'my_local_branch' and want to pull in...

git push fails: RPC failed; result=22, HTTP code = 411

I have only one branch. For a few months I have been using git push origin master to commit to my local repository. Last night after I made some minor changes to my local repository and tried to...

Authenticate with GitHub using a token

I am trying to authenticate with GitHub using a personal access token. In the help files at GitHub, it states to use the cURL method to authenticate (Creating a personal access token). I have...

git command to show branch upstream

git's --help and man page very clearly shows good ways to set upstream for a branch, but I have not found a great way to get the current upstream. Unfortunately, git branch -v shows only the...

cannot checkout remote git branch

I'm in a github local clone. Below is the list of branches: $ git branch -a * master online-demo remotes/origin/HEAD -> origin/master remotes/origin/develop remotes/origin/gh-pages ...

How to git pull from public repo via ssh without a key?

I have a public repo, https://github.com/rlpowell/config . I used to be able to run git pull without any ssh keys (i.e. from cron), and it work work fine, using the...

Jenkins - Delete deployed artifacts on job delete

Currently, I'm creating a Jenkins job that automatically creates new Jenkins jobs when new branches are created in a Git repository. It should also be deleted when the branches are deleted. This...

What is the base branch when a new one is created?

I need to confirm/correct my assumptions when creating branches. If I'm in master branch, after doing: git checkout -b some_branch it means I have started a new branch from master. On the other...

How do I set my password in Sourcetree?

I'm using Sourcetree version 2.1.10.0 as a git gui tool. When I go to Tools > Options > Authentication, I edit my account, click "Refresh Password" and set my password for my account. I get the...

Does the direction or order of a merge/rebase make a difference?

Let's say you pull from a remote repository while you're working on your feature branch and new commits are added to the master branch. You finish working on the feature branch, commit your...

Copying local git config into docker container

I'm using both docker and docker-compose to host what for the most part is a LAMP stack. I'd like to be able to use git inside one of my containers without it asking for my user.email and...

How to check the latest commit irrespective of the branch in the git history?

In my project there are multiple branches. I want to check which is the latest commit in the history irrespective of any branch. I have tried git log -n 1 --date-order but it gives the commit in...

Push to origin from GitHub action

I'm trying to push to origin remote from GitHub action. The logic of my action is: handle pull_request_review events and filter by comment message checkout to master, merge PR branch, run some...

BUILD FAILURE: No main.py(o) found in your app directory

I am a beginner in kivy and trying to build an app using Ubunto microsoft app on windows 10 any kind of help will be appreciated. Although I put it in same location of the buildozer.spec I keep...

Composer package installed through php v7.1 but not php v7.2

In my Homestead development environment, I've tried to install a composer package called ralouphie/getallheaders through php v7.1; it's done successfully. But when I am trying through php v7.2, it...

Enforce hook for branch creation in GitHub enterprise to not allow creating branches with names with certain regex pattern

We have a requirement where collaborators with write access to a GitHub repository should not be allowed to create branches with certain names. They can create locally but can't push to remote and...

Azure DevOps REST API Perform Git Merge

I am trying to merge a branch using the NodeJS SDK for the Azure DevOps REST API. I have the following typescript code using the Azure DevOps Node SDK...

github how to fix error: refname refs/heads/new_branch not found

I'm really new to GitHub. I made my first project and want to add it to GitHub. But when I try to add my project to GitHub I'm getting the following error and I couldn't find a way to fix it. git...

How to push both the client side and server side project folders together as a one project (api + front end) on github?

I have completed my project. My stack : Front-End UI => Reactjs Back-End => Nodejs/Expressjs + MongoDB And below is my project structure containing both the folders: project_Name > client +...

What does the -M mean in git branch -M main?

GitHub says to enter git branch -M main as a step for creating a new repository on the command line. What does the -M mean?