[...] If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example: git checkout -b new_branch_name HEAD is now at a76a41f... - release 2 fatal: HEAD does not point to a branch Available branches: AC-branch master Searching for tag auto/ti/lzop-1.03-2... Searching for tag auto/ti/lzop-1_03-2... --2018-03-14 16:58:13-- http://distfiles.pld-linux.org/distfiles/by-md5/0/0/006c5e27fb78cdd14a628fdfa5aa1905/lzop-1.03.tar.gz Resolving distfiles.pld-linux.org (distfiles.pld-linux.org)... 193.239.45.41 Connecting to distfiles.pld-linux.org (distfiles.pld-linux.org)|193.239.45.41|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 370775 (362K) [application/x-gzip] Saving to: 'lzop-1.03.tar.gz' 0K .......... .......... .......... .......... .......... 13% 1.22M 0s 50K .......... .......... .......... .......... .......... 27% 2.41M 0s 100K .......... .......... .......... .......... .......... 41% 60.6M 0s 150K .......... .......... .......... .......... .......... 55% 155M 0s 200K .......... .......... .......... .......... .......... 69% 2.42M 0s 250K .......... .......... .......... .......... .......... 82% 87.3M 0s 300K .......... .......... .......... .......... .......... 96% 149M 0s 350K .......... .. 100% 196M=0.08s 2018-03-14 16:58:13 (4.28 MB/s) - 'lzop-1.03.tar.gz' saved [370775/370775] Building target platforms: i686-linux Wrote: /home/users/builder/rpm/SRPMS/lzop-1.03-2.src.rpm exit status 0 Tagging with prefix: auto/ti/ HEAD is now at a76a41f... - release 2 fatal: HEAD does not point to a branch Writing git revision for tag auto/ti/lzop-1.03-2 On detached HEAD. Use -r BRANCHNAME to override error: Macro %_builddir has empty body error: Macro %_builddir has empty body Executing(--clean): env -i TMP=/home/users/builder/tmp HOME=/home/users/builder PATH=/bin:/usr/bin:/usr/sbin:/sbin:/usr/X11R6/bin TMPDIR=/home/users/builder/tmp /bin/sh -e /home/users/builder/tmp/rpm-tmp.50453 + umask 022 + cd /home/users/builder/rpm/BUILD + rm -rf lzop-1.03 Begin-TLD-Builder-Info Build-Time: user:0.75s sys:0.23s real:2.04s (faults io:0 non-io:78747) Files queued for ftp: 375282 lzop-1.03-2.src.rpm 181 lzop-1.03-2.src.rpm.uploadinfo End-TLD-Builder-Info