1

I'm working on FFmpeg. I git clone its source code. When I git status, everything works well.

FFmpeg git:(master) git status On branch master Your branch is behind 'origin/master' by 2 commits, and can be fast-forwarded. (use "git pull" to update your local branch) nothing to commit, working tree clean 

But now I want to change branch to release/3.4, some files have been changed.

FFmpeg git:(master) git checkout release/3.4 Switched to branch 'release/3.4' Your branch is up-to-date with 'origin/release/3.4'. FFmpeg git:(release/3.4) ✗ git status On branch release/3.4 Your branch is up-to-date with 'origin/release/3.4'. Untracked files: (use "git add <file>..." to include in what will be committed) libavcodec/codec_list.c libavcodec/parser_list.c libavdevice/indev_list.c libavdevice/outdev_list.c libavfilter/filter_list.c libavformat/demuxer_list.c libavformat/muxer_list.c nothing added to commit but untracked files present (use "git add" to track) 

I'm very confused. I have never changed these files.

4
  • you should check whether those files existed on your original branch.. Commented Apr 16, 2018 at 8:06
  • Yes they are on master branch. Commented Apr 16, 2018 at 8:08
  • perhaps you will need a 'hard' checkout where untracked files are removed.. ps. i never used git directly since i'm prone to mess the entire repo.. Commented Apr 16, 2018 at 8:09
  • I do not know why. Commented Apr 16, 2018 at 8:14

1 Answer 1

2

In master those files are in .gitignore, but in release/3.4 they are not. Maybe they are not used in that release, or .gitignore in the release branch is wrong. In general it is better to clean build artifacts before switching the branch, to prevent unexpected behavior from VCS or subsequent build.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.